Changeset 89841 in webkit
- Timestamp:
- Jun 27, 2011 11:36:06 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
r89838 r89841 32 32 var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName; 33 33 if (PersistentCache.contains(cacheKey)) { 34 callback(PersistentCache.get(cacheKey)); 35 return; 34 var cachedData = PersistentCache.get(cacheKey); 35 // Old versions of this function used to cache only the set of tests. 36 if ('tooManyFailures' in cachedData) { 37 callback(cachedData.tests, cachedData.tooManyFailures); 38 return; 39 } 36 40 } 37 41 38 var tests = {};42 var result = { tests: {}, tooManyFailures: false }; 39 43 40 44 var parsedBuildName = this._builder.buildbot.parseBuildName(buildName); … … 51 55 52 56 if (resultsHTMLSupportsTooManyFailuresInfo) 53 tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;57 result.tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0; 54 58 55 59 function testsForResultTable(regex) { … … 67 71 68 72 testsForResultTable(/did not match expected results/).forEach(function(name) { 69 tests[name] = 'fail';73 result.tests[name] = 'fail'; 70 74 }); 71 75 testsForResultTable(/timed out/).forEach(function(name) { 72 tests[name] = 'timeout';76 result.tests[name] = 'timeout'; 73 77 }); 74 78 testsForResultTable(/tool to crash/).forEach(function(name) { 75 tests[name] = 'crash';79 result.tests[name] = 'crash'; 76 80 }); 77 81 testsForResultTable(/Web process to crash/).forEach(function(name) { 78 tests[name] = 'webprocess crash';82 result.tests[name] = 'webprocess crash'; 79 83 }); 80 84 81 PersistentCache.set(cacheKey, tests);82 callback( tests,tooManyFailures);85 PersistentCache.set(cacheKey, result); 86 callback(result.tests, result.tooManyFailures); 83 87 }, 84 88 function(xhr) { 85 89 // We failed to fetch results.html. run-webkit-tests must have aborted early. 86 PersistentCache.set(cacheKey, tests);87 errorCallback( tests,tooManyFailures);90 PersistentCache.set(cacheKey, result); 91 errorCallback(result.tests, result.tooManyFailures); 88 92 }); 89 93 } … … 97 101 if (failingTestCount < 0) { 98 102 // The number of failing tests couldn't be determined. 99 PersistentCache.set(cacheKey, tests);100 errorCallback( tests,tooManyFailures);103 PersistentCache.set(cacheKey, result); 104 errorCallback(result.tests, result.tooManyFailures); 101 105 return; 102 106 } … … 104 108 if (!failingTestCount) { 105 109 // All tests passed. 106 PersistentCache.set(cacheKey, tests);107 callback(tests,tooManyFailures);110 PersistentCache.set(cacheKey, result); 111 errorCallback(result.tests, result.tooManyFailures); 108 112 return; 109 113 } -
trunk/Tools/ChangeLog
r89840 r89841 1 2011-06-27 Adam Roben <aroben@apple.com> 2 3 Make LayoutTestResultsLoader cache whether old-run-webkit-tests exited early due to too many 4 failures 5 6 Fixes <http://webkit.org/b/63470> TestFailures page for a particular builder forgets 7 old-run-webkit-tests exited early after reload 8 9 Reviewed by Anders Carlsson. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: 12 (LayoutTestResultsLoader.prototype.start): Store both the set of failing tests and whether 13 old-run-webkit-tests exited early due to too many failures in PersistentCache. 14 1 15 2011-06-27 Adam Roben <aroben@apple.com> 2 16
Note: See TracChangeset
for help on using the changeset viewer.