Changeset 87299 in webkit
- Timestamp:
- May 25, 2011 9:38:29 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js
r87148 r87299 103 103 if (!layoutTestStep) { 104 104 self._cache[cacheKey] = -1; 105 callback(self._cache[cacheKey] );105 callback(self._cache[cacheKey], false); 106 106 return; 107 107 } … … 110 110 // run-webkit-tests never even ran. 111 111 self._cache[cacheKey] = -1; 112 callback(self._cache[cacheKey] );112 callback(self._cache[cacheKey], false); 113 113 return; 114 114 } … … 117 117 // All tests passed. 118 118 self._cache[cacheKey] = 0; 119 callback(self._cache[cacheKey]); 120 return; 121 } 122 123 if (/^Exiting early/.test(layoutTestStep.results[1][0])) { 124 // Too many tests crashed or timed out. We can't know for sure how many failed. 125 self._cache[cacheKey] = -1; 126 callback(self._cache[cacheKey]); 127 return; 128 } 119 callback(self._cache[cacheKey], false); 120 return; 121 } 122 123 var tooManyFailures = false; 124 if (/^Exiting early/.test(layoutTestStep.results[1][0])) 125 tooManyFailures = true; 129 126 130 127 var failureCount = layoutTestStep.results[1].reduce(function(sum, outputLine) { … … 136 133 137 134 self._cache[cacheKey] = failureCount; 138 callback(failureCount );135 callback(failureCount, tooManyFailures); 139 136 }); 140 137 }, … … 144 141 * passed an object like the following: 145 142 * { 146 * 'r2_1 (1)': { 147 * 'css1/basic/class_as_selector2.html': 'fail', 143 * 'r12347 (681)': { 144 * 'tooManyFailures': false, 145 * 'tests': { 146 * 'css1/basic/class_as_selector2.html': 'fail', 147 * }, 148 148 * }, 149 * 'r1_1 (0)': { 150 * 'css1/basic/class_as_selector.html': 'crash', 149 * 'r12346 (680)': { 150 * 'tooManyFailures': false, 151 * 'tests': {}, 152 * }, 153 * 'r12345 (679)': { 154 * 'tooManyFailures': false, 155 * 'tests': { 156 * 'css1/basic/class_as_selector.html': 'crash', 157 * }, 151 158 * }, 152 159 * }, … … 234 241 235 242 var self = this; 236 self.getNumberOfFailingTests(buildNumber, function(failingTestCount ) {243 self.getNumberOfFailingTests(buildNumber, function(failingTestCount, tooManyFailures) { 237 244 if (failingTestCount < 0) { 238 245 // The number of failing tests couldn't be determined. 239 errorCallback(tests );246 errorCallback(tests, tooManyFailures); 240 247 return; 241 248 } … … 243 250 if (!failingTestCount) { 244 251 // All tests passed. 245 callback(tests );252 callback(tests, tooManyFailures); 246 253 return; 247 254 } … … 278 285 }); 279 286 280 callback(tests );287 callback(tests, tooManyFailures); 281 288 }, 282 289 function(xhr) { 283 290 // We failed to fetch results.html. run-webkit-tests must have aborted early. 284 errorCallback(tests );291 errorCallback(tests, tooManyFailures); 285 292 }); 286 293 }); … … 291 298 var nextBuildName = buildNames[buildIndex]; 292 299 293 this._getFailingTests(nextBuildName, function(tests) { 294 history[nextBuildName] = {}; 300 this._getFailingTests(nextBuildName, function(tests, tooManyFailures) { 301 history[nextBuildName] = { 302 tooManyFailures: tooManyFailures, 303 tests: {}, 304 }; 295 305 296 306 for (var testName in tests) { 297 307 if (previousBuildName) { 298 if (!(testName in history[previousBuildName] ))308 if (!(testName in history[previousBuildName].tests)) 299 309 continue; 300 delete history[previousBuildName] [testName];310 delete history[previousBuildName].tests[testName]; 301 311 } 302 history[nextBuildName] [testName] = tests[testName];303 } 304 305 callback(Object.keys(history[nextBuildName] ).length);312 history[nextBuildName].tests[testName] = tests[testName]; 313 } 314 315 callback(Object.keys(history[nextBuildName].tests).length); 306 316 }, 307 317 function(tests) { -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css
r86766 r87299 2 2 list-style-type: none; 3 3 } 4 4 5 dt { 5 6 float: left; … … 7 8 margin-right: 3px; 8 9 } 10 9 11 dt::after { 10 12 content: ':'; 11 13 } 14 15 .info { 16 font-style: italic; 17 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js
r87148 r87299 50 50 var list = document.createElement('ol'); 51 51 Object.keys(history).forEach(function(buildName, buildIndex, buildNameArray) { 52 if (!Object.keys(history[buildName] ).length)52 if (!Object.keys(history[buildName].tests).length) 53 53 return; 54 54 var dlItems = [ … … 62 62 list.appendChild(item); 63 63 64 if (history[buildName].tooManyFailures) { 65 var p = document.createElement('p'); 66 p.className = 'info'; 67 p.appendChild(document.createTextNode('run-webkit-tests exited early due to too many failures/crashes/timeouts')); 68 item.appendChild(p); 69 } 70 64 71 var testList = document.createElement('ol'); 65 for (var testName in history[buildName] ) {72 for (var testName in history[buildName].tests) { 66 73 var testItem = document.createElement('li'); 67 testItem.appendChild(self._domForFailedTest(builder, buildName, testName, history[buildName] [testName]));74 testItem.appendChild(self._domForFailedTest(builder, buildName, testName, history[buildName].tests[testName])); 68 75 testList.appendChild(testItem); 69 76 } … … 82 89 _displayTesters: function() { 83 90 var list = document.createElement('ul'); 84 var testersAndFailureCounts = [];91 var latestBuildInfos = []; 85 92 86 93 function updateList() { 87 testersAndFailureCounts.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });94 latestBuildInfos.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) }); 88 95 while (list.firstChild) 89 96 list.removeChild(list.firstChild); 90 testersAndFailureCounts.forEach(function(testerAndFailureCount) { 91 var tester = testerAndFailureCount.tester; 92 var failureCount = testerAndFailureCount.failureCount; 93 97 latestBuildInfos.forEach(function(buildInfo) { 94 98 var link = document.createElement('a'); 95 link.href = '#/' + tester.name;96 link.appendChild(document.createTextNode( tester.name));99 link.href = '#/' + buildInfo.tester.name; 100 link.appendChild(document.createTextNode(buildInfo.tester.name)); 97 101 98 102 var item = document.createElement('li'); 99 103 item.appendChild(link); 100 item.appendChild(document.createTextNode(' (' + failureCount + ' failing tests)')); 104 if (buildInfo.tooManyFailures) 105 item.appendChild(document.createTextNode(' (too many failures/crashes/timeouts)')); 106 else 107 item.appendChild(document.createTextNode(' (' + buildInfo.failureCount + ' failing tests)')); 101 108 list.appendChild(item); 102 109 }); … … 108 115 if (buildNumber < 0) 109 116 return; 110 tester.getNumberOfFailingTests(buildNumber, function(failureCount ) {117 tester.getNumberOfFailingTests(buildNumber, function(failureCount, tooManyFailures) { 111 118 if (failureCount <= 0) 112 119 return; 113 testersAndFailureCounts.push({ tester: tester, failureCount: failureCount});120 latestBuildInfos.push({ tester: tester, failureCount: failureCount, tooManyFailures: tooManyFailures }); 114 121 updateList(); 115 122 }); -
trunk/Tools/ChangeLog
r87274 r87299 1 2011-05-25 Adam Roben <aroben@apple.com> 2 3 Identify, rather than skip, builds where run-webkit-tests exited early due to too many failures 4 5 Fixes <http://webkit.org/b/61441> TestFailures page should show when run-webkit-tests 6 started exiting early due to too many crashes, timeouts, or failures 7 8 Reviewed by David Kilzer. 9 10 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: 11 (Builder.prototype.getNumberOfFailingTests): Rather than returning -1 ("unknown") when 12 run-webkit-tests exits early due to too many failures, pass that information in another 13 argument to the callback. 14 (Builder.prototype.startFetchingBuildHistory): Updated the documentation comment to reflect 15 the new structure of the object passed to the callback. 16 (Builder.prototype._getFailingTests): Updated to expect a tooManyFailures boolean from 17 getNumberOfFailingTests and to pass that along to our own callbacks. 18 (Builder.prototype._incorporateBuildHistory): Updated to expect a tooManyFailures boolean 19 from _getFailingTests and to store that value in the history object. 20 21 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css: 22 (.info): Added. 23 24 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js: 25 (ViewController.prototype._displayBuilder): Updated for change in structure to the history 26 object and to add a note when run-webkit-tests exited early due to too many failures. 27 (ViewController.prototype._displayTesters): Renamed testersAndFailureCounts to 28 latestBuildInfos since each entry now contains more than just the tester and failure count. 29 Now displays a message for testers where the latest build exited early due to too many 30 failures. Updated to expect a tooManyFailures boolean from getNumberOfFailingTests and to 31 store that value in latestBuildInfos. 32 1 33 2011-05-24 Keishi Hattori <keishi@webkit.org> 2 34
Note: See TracChangeset
for help on using the changeset viewer.