Changeset 92346 in webkit
- Timestamp:
- Aug 3, 2011 9:16:47 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js
r92344 r92346 29 29 }; 30 30 31 checkout.updateExpectations = function(failureInfoList, callback) 32 { 33 $.post('/updateexpectations', JSON.stringify(failureInfoList), function() { 34 callback(); 35 }); 36 }; 37 31 38 checkout.optimizeBaselines = function(testName, callback) 32 39 { … … 38 45 }; 39 46 40 checkout.rebaseline = function( rebaselineTasks, callback)47 checkout.rebaseline = function(failureInfoList, callback) 41 48 { 42 base.callInSequence(function( task, callback) {43 var extensionList = Array.prototype.concat.apply([], task.failureTypeList.map(results.failureTypeToExtensionList));49 base.callInSequence(function(failureInfo, callback) { 50 var extensionList = Array.prototype.concat.apply([], failureInfo.failureTypeList.map(results.failureTypeToExtensionList)); 44 51 base.callInSequence(function(extension, callback) { 45 52 $.post('/rebaseline?' + $.param({ 46 'builder': task.builderName,47 'test': task.testName,53 'builder': failureInfo.builderName, 54 'test': failureInfo.testName, 48 55 'extension': extension 49 56 }), function() { … … 51 58 }); 52 59 }, extensionList, callback); 53 }, rebaselineTasks, function() {54 var testNameList = base.uniquifyArray( rebaselineTasks.map(function(task) { return task.testName; }));60 }, failureInfoList, function() { 61 var testNameList = base.uniquifyArray(failureInfoList.map(function(failureInfo) { return failureInfo.testName; })); 55 62 base.callInSequence(checkout.optimizeBaselines, testNameList, callback); 56 63 }); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html
r92344 r92346 16 16 <button class="show-selected-failures">Show Selected Failures</button> 17 17 <button class="rebaseline-selected">Rebaseline Selected</button> 18 <button class="add-selected-expectations">Mark Selected as Expected</button> 18 19 <button class="refresh">Refresh</button> 19 20 </div> -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js
r92344 r92346 60 60 } 61 61 62 function rebaseline( rebaselineTasks)62 function rebaseline(failureInfoList) 63 63 { 64 64 displayOnButterbar('Rebaselining...'); 65 checkout.rebaseline( rebaselineTasks, function() {65 checkout.rebaseline(failureInfoList, function() { 66 66 dismissButterbar(); 67 67 // FIXME: We should use something like a lightbox rather than alert! 68 68 alert('New results downloaded to your working copy. Please use "webkit-patch land-cowboy" to land the updated baselines.'); 69 69 }); 70 } 71 72 function updateExpectations(failureInfoList) 73 { 74 displayOnButterbar('Adding expectations...'); 75 checkout.updateExpectations(failureInfoList, dismissButterbar); 70 76 } 71 77 … … 110 116 function executeQueuedRebaselines() 111 117 { 112 var rebaselineQueue= model.takeRebaselineQueue();113 if (! rebaselineQueue.length)118 var failureInfoList = model.takeRebaselineQueue(); 119 if (!failureInfoList.length) 114 120 return; 115 121 // FIXME: Should we confirm with the use before executing the queue? 116 rebaseline( rebaselineQueue);122 rebaseline(failureInfoList); 117 123 } 118 124 … … 157 163 function selectedFailures() 158 164 { 159 var failure s= [];165 var failureInfoList = []; 160 166 161 167 $('.test input:checkbox').each(function() { … … 170 176 var failureTypeList = failureTypes.split(' '); 171 177 var builderName = $(this).attr(config.kBuilderNameAttr); 172 failure s.push({178 failureInfoList.push({ 173 179 'testName': testName, 174 180 'builderName': builderName, … … 178 184 }); 179 185 180 return failure s;186 return failureInfoList; 181 187 } 182 188 … … 186 192 } 187 193 194 function updateExpectationsForSelected() 195 { 196 updateExpectations(selectedFailures()); 197 } 198 188 199 function showSelectedFailures() 189 200 { 190 var argumentList = selectedFailures().map(function(failure Description) {191 return [failure Description.testName, failureDescription.builderName, failureDescription.failureTypeList];201 var argumentList = selectedFailures().map(function(failureInfo) { 202 return [failureInfo.testName, failureInfo.builderName, failureInfo.failureTypeList]; 192 203 }); 193 204 g_resultsDetailsIterator = new base.CallbackIterator(showResultsDetail, argumentList); … … 266 277 $('.show-selected-failures').live('click', showSelectedFailures); 267 278 $('.rebaseline-selected').live('click', rebaselineSelected); 279 $('.update-expectations-selected').live('click', updateExpectationsForSelected); 268 280 $('.refresh').live('click', update); 269 281 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model.js
r92344 r92346 58 58 { 59 59 var unexpectedFailures = results.unexpectedFailuresByTest(model.state.resultsByBuilder); 60 console.log(unexpectedFailures);61 60 62 61 $.each(model.state.failureAnalysisByTest, function(testName, failureAnalysis) { -
trunk/Tools/ChangeLog
r92344 r92346 1 2011-08-03 Adam Barth <abarth@webkit.org> 2 3 Add UI to garden-o-matic for updating expectations 4 https://bugs.webkit.org/show_bug.cgi?id=65644 5 6 Reviewed by Dimitri Glazkov. 7 8 The patch plumbs the UI back to the gardening server, but the gardening 9 server endpoint is just a stub at this point. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/checkout.js: 12 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/main.js: 14 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/model.js: 15 * Scripts/webkitpy/tool/servers/gardeningserver.py: 16 * Scripts/webkitpy/tool/servers/reflectionhandler.py: 17 1 18 2011-08-03 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
r92166 r92346 81 81 self._serve_text('success') 82 82 83 def updateexpectations(self): 84 failure_info_list = self._read_entity_body_as_json() 85 print 'FailureInfoList:', failure_info_list 86 self._serve_text('success') 87 83 88 def rebaseline(self): 84 89 builder = self.query['builder'][0] -
trunk/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
r91167 r92346 61 61 def do_POST(self): 62 62 self._handle_request() 63 64 def _read_entity_body(self): 65 length = int(self.headers.getheader('content-length')) 66 return self.rfile.read(length) 67 68 def _read_entity_body_as_json(self): 69 return json.loads(self._read_entity_body()) 63 70 64 71 def _handle_request(self):
Note: See TracChangeset
for help on using the changeset viewer.