Changeset 90747 in webkit
- Timestamp:
- Jul 11, 2011 8:27:05 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
r90656 r90747 31 31 start: function(buildName, callback, errorCallback) { 32 32 var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName; 33 const currentCachedDataVersion = 3;33 const currentCachedDataVersion = 4; 34 34 if (PersistentCache.contains(cacheKey)) { 35 35 var cachedData = PersistentCache.get(cacheKey); … … 83 83 var self = this; 84 84 85 function fetchAndParseResultsHTML AndCallCallback() {85 function fetchAndParseResultsHTML(successCallback, errorCallback) { 86 86 getResource(self._builder.resultsPageURL(buildName), function(xhr) { 87 87 var parseResult = (new ORWTResultsParser()).parse(xhr.responseText); … … 89 89 if (resultsHTMLSupportsTooManyFailuresInfo) 90 90 result.tooManyFailures = parseResult.tooManyFailures; 91 92 successCallback(result); 91 successCallback(); 93 92 }, 94 93 function(xhr) { 95 // We failed to fetch results.html. run-webkit-tests must have aborted early.94 // We failed to fetch results.html. 96 95 errorCallback(); 97 96 }); 98 97 } 99 98 99 function fetchNumberOfFailingTests(successCallback, errorCallback) { 100 self._builder.getNumberOfFailingTests(parsedBuildName.buildNumber, function(failingTestCount, tooManyFailures) { 101 result.tooManyFailures = tooManyFailures; 102 103 if (failingTestCount < 0) { 104 // The number of failing tests couldn't be determined. 105 errorCallback(); 106 return; 107 } 108 109 successCallback(failingTestCount); 110 }); 111 } 112 100 113 if (resultsHTMLSupportsTooManyFailuresInfo) { 101 fetchAndParseResultsHTMLAndCallCallback(); 114 fetchAndParseResultsHTML(function() { 115 successCallback(result); 116 }, 117 function() { 118 fetchNumberOfFailingTests(function(failingTestCount) { 119 if (!failingTestCount) { 120 // All tests passed, so no results.html was generated. 121 successCallback(result); 122 return; 123 } 124 125 // Something went wrong with fetching results. 126 errorCallback(); 127 }, errorCallback); 128 }); 102 129 return; 103 130 } 104 131 105 self._builder.getNumberOfFailingTests(parsedBuildName.buildNumber, function(failingTestCount, tooManyFailures) { 106 result.tooManyFailures = tooManyFailures; 107 108 if (failingTestCount < 0) { 109 // The number of failing tests couldn't be determined. 110 errorCallback(); 111 return; 112 } 113 132 fetchNumberOfFailingTests(function(failingTestCount) { 114 133 if (!failingTestCount) { 115 134 // All tests passed. … … 119 138 120 139 // Find out which tests failed. 121 fetchAndParseResultsHTMLAndCallCallback(); 122 }); 140 fetchAndParseResultsHTML(function() { 141 successCallback(result); 142 }, errorCallback); 143 }, errorCallback); 123 144 }, 124 145 }; -
trunk/Tools/ChangeLog
r90746 r90747 1 2011-07-11 Adam Roben <aroben@apple.com> 2 3 Teach TestFailures that ORWT's results.html file might be missing due to all tests passing 4 5 There are three reasons why we might fail to fetch ORWT's results.html: 6 - All tests passed, so no results.html was generated 7 - Some error during the test run caused results.html not to be generated (e.g., ORWT 8 timed out) 9 - Some network error occurred when fetching results.html 10 11 We were failing to account for the first possibility in some cases. For test runs before 12 r89610, we first check build.webkit.org/json to determine how many tests failed and whether 13 ORWT exited early due to too many failures; if all tests passed then we don't fetch 14 results.html at all. r89610 changed ORWT to put information in results.html about exiting 15 early due to too many failures, so we no longer needed to check build.webkit.org/json to get 16 that information, and in r89619 I changed TestFailures to do just that. But I forgot that we 17 still needed to check build.webkit.org/json to find out if all tests passed! 18 19 Now, for test runs after r89610, we check results.html first, and then check 20 build.webkit.org/json if we fail to fetch results.html. This lets us distinguish between all 21 tests passing and the error cases. 22 23 Fixes <http://webkit.org/b/64280> TestFailures page can't pinpoint that r90699 caused 13 24 tests to fail on Windows 7 Release (WebKit2 Tests) 25 26 Reviewed by David Kilzer. 27 28 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: 29 (LayoutTestResultsLoader.prototype.start): Bumped the cache version so that old, buggy 30 cached data will get evicted. We were marking builds where all tests passed as errors! 31 (LayoutTestResultsLoader.prototype._fetchAndParseORWTResults): Added success/error callback 32 parameters to the fetchAndParseResultsHTML helper function, and added a similar 33 fetchNumberOfFailingTests function that fetches data from build.webkit.org/json (code came 34 from later in the function). For test runs before r89610, we first check 35 build.webkit.org/json then check results.html. For builds after r89610, we first check 36 results.html and then check build.webkit.org/json if we couldn't fetch results.html. 37 1 38 2011-07-11 Csaba Osztrogonác <ossy@webkit.org> 2 39
Note: See TracChangeset
for help on using the changeset viewer.