Changeset 90489 in webkit
- Timestamp:
- Jul 6, 2011 1:42:14 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js
r90165 r90489 42 42 url: urlStem + '-pretty-diff.html', 43 43 }, 44 flaky: { 45 text: 'pretty diff (flaky)', 46 url: urlStem + '-pretty-diff.html', 47 }, 44 48 timeout: { 45 49 text: 'timed out', … … 137 141 138 142 result.failureCount = layoutTestStep.results[1].reduce(function(sum, outputLine) { 139 var match = /^(\d+) test case/.exec(outputLine);143 var match = /^(\d+)/.exec(outputLine); 140 144 if (!match) 141 145 return sum; 142 // Don't count new tests as failures.143 if (outputLine. indexOf('were new') >= 0)146 // Don't count new tests or passes as failures. 147 if (outputLine.contains('were new') || outputLine.contains('new passes')) 144 148 return sum; 145 149 return sum + parseInt(match[1], 10); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
r90488 r90489 42 42 var result = { tests: {}, tooManyFailures: false, version: currentCachedDataVersion }; 43 43 44 function cacheParseResultsAndCallCallback(parseResult) { 45 result.tests = parseResult.tests; 46 result.tooManyFailures = parseResult.tooManyFailures; 47 48 PersistentCache.set(cacheKey, result); 49 callback(result.tests, result.tooManyFailures); 50 } 51 52 var self = this; 53 self._fetchAndParseNRWTResults(buildName, cacheParseResultsAndCallCallback, function() { 54 self._fetchAndParseORWTResults(buildName, cacheParseResultsAndCallCallback, function() { 55 // We couldn't fetch results for this build. 56 PersistentCache.set(cacheKey, result); 57 errorCallback(result.tests, result.tooManyFailures); 58 }); 59 }); 60 }, 61 62 _fetchAndParseNRWTResults: function(buildName, successCallback, errorCallback) { 63 getResource(this._builder.resultsDirectoryURL(buildName) + 'full_results.json', function(xhr) { 64 successCallback((new NRWTResultsParser()).parse(xhr.responseText)); 65 }, 66 function(xhr) { 67 errorCallback(); 68 }); 69 }, 70 71 _fetchAndParseORWTResults: function(buildName, successCallback, errorCallback) { 44 72 var parsedBuildName = this._builder.buildbot.parseBuildName(buildName); 45 73 … … 47 75 var resultsHTMLSupportsTooManyFailuresInfo = parsedBuildName.revision >= 89610; 48 76 77 var result = { tests: {}, tooManyFailures: false }; 78 49 79 var self = this; 50 80 51 function fetchAndParseResultsHTMLAndCallCallback( callback) {81 function fetchAndParseResultsHTMLAndCallCallback() { 52 82 getResource(self._builder.resultsPageURL(buildName), function(xhr) { 53 83 var parseResult = (new ORWTResultsParser()).parse(xhr.responseText); … … 56 86 result.tooManyFailures = parseResult.tooManyFailures; 57 87 58 PersistentCache.set(cacheKey, result); 59 callback(result.tests, result.tooManyFailures); 88 successCallback(result); 60 89 }, 61 90 function(xhr) { 62 91 // We failed to fetch results.html. run-webkit-tests must have aborted early. 63 PersistentCache.set(cacheKey, result); 64 errorCallback(result.tests, result.tooManyFailures); 92 errorCallback(); 65 93 }); 66 94 } 67 95 68 96 if (resultsHTMLSupportsTooManyFailuresInfo) { 69 fetchAndParseResultsHTMLAndCallCallback( callback);97 fetchAndParseResultsHTMLAndCallCallback(); 70 98 return; 71 99 } … … 76 104 if (failingTestCount < 0) { 77 105 // The number of failing tests couldn't be determined. 78 PersistentCache.set(cacheKey, result); 79 errorCallback(result.tests, result.tooManyFailures); 106 errorCallback(); 80 107 return; 81 108 } … … 83 110 if (!failingTestCount) { 84 111 // All tests passed. 85 PersistentCache.set(cacheKey, result); 86 errorCallback(result.tests, result.tooManyFailures); 112 successCallback(result); 87 113 return; 88 114 } 89 115 90 116 // Find out which tests failed. 91 fetchAndParseResultsHTMLAndCallCallback( callback);117 fetchAndParseResultsHTMLAndCallCallback(); 92 118 }); 93 119 }, -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js
r90264 r90489 115 115 } 116 116 117 Array.prototype.contains = function(value) { 118 return this.indexOf(value) >= 0; 119 } 120 117 121 Array.prototype.findFirst = function(predicate) { 118 122 for (var i = 0; i < this.length; ++i) { … … 146 150 this.removeChild(this.firstChild); 147 151 } 152 153 String.prototype.contains = function(substring) { 154 return this.indexOf(substring) >= 0; 155 } -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html
r90488 r90489 34 34 <script src="LayoutTestHistoryAnalyzer.js"></script> 35 35 <script src="LayoutTestResultsLoader.js"></script> 36 <script src="NRWTResultsParser.js"></script> 36 37 <script src="ORWTResultsParser.js"></script> 37 38 <script src="PersistentCache.js"></script> -
trunk/Tools/ChangeLog
r90488 r90489 1 2011-07-06 Adam Roben <aroben@apple.com> 2 3 Teach TestFailures how to load, parse, and interpret NRWT test results 4 5 Fixes <http://webkit.org/b/61877> TestFailures page doesn't show testers that use 6 new-run-webkit-tests 7 8 Reviewed by Adam Barth. 9 10 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: 11 (Builder.prototype.failureDiagnosisTextAndURL): Added support for the new 'flaky' failure 12 type. For now we don't account for image-only flakes (but TestFailures doesn't deal with 13 pixel tests at all currently). 14 (Builder.prototype.getNumberOfFailingTests): Relaxed the regex used for parsing the number 15 of failing tests from the buildbot output. Make sure not to count "new passes" (a new 16 category introduced by NRWT) as failures. 17 18 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: 19 (LayoutTestResultsLoader.prototype.start): Moved a bunch of code from here to 20 _fetchAndParseORWTResults. This function now attempts to load NRWT results, then falls back 21 to loading ORWT results. 22 (LayoutTestResultsLoader.prototype._fetchAndParseNRWTResults): Added. Tries to load and 23 parse the full_results.json file for the given build. 24 (LayoutTestResultsLoader.prototype._fetchAndParseORWTResults): Added. Code came from start. 25 Fixed a bug along the way where we were sometimes calling the error callback instead of the 26 success callback when all tests passed. 27 28 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/NRWTResultsParser.js: Added. 29 (NRWTResultsParser): Do-nothing constructor. 30 (NRWTResultsParser.prototype.parse): Uses eval() (eww!) to get the test results out of the 31 JS string, then iterates over all the tests in the results data and builds up a data 32 structure matching what ORWTResultsParser returns. 33 34 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Utilities.js: 35 (Array.prototype.contains): 36 (String.prototype.contains): 37 Added these simple helper functions. 38 39 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in 40 NRWTResultsParser.js. 41 1 42 2011-07-06 Adam Roben <aroben@apple.com> 2 43
Note: See TracChangeset
for help on using the changeset viewer.