Changeset 90120 in webkit
- Timestamp:
- Jun 30, 2011, 8:30:18 AM (14 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js
r89840 r90120 35 35 }, 36 36 37 failureDiagnosisTextAndURL: function(buildName, testName, failureType) {37 failureDiagnosisTextAndURL: function(buildName, testName, testResult) { 38 38 var urlStem = this.resultsDirectoryURL(buildName) + testName.replace(/\.[^.]+$/, ''); 39 39 var diagnosticInfo = { … … 55 55 }; 56 56 57 return diagnosticInfo[ failureType];57 return diagnosticInfo[testResult.failureType]; 58 58 }, 59 59 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js
r90054 r90120 62 62 63 63 var testData = this._tests[testName]; 64 testData.history.push({ build: buildName, result: 'pass'});64 testData.history.push({ build: buildName, result: { failureType: 'pass' } }); 65 65 66 66 if (testData.state === this._states.LastSeenFailing) … … 79 79 var examples = []; 80 80 for (var i = 0; i < history.length - 1; ++i) { 81 var thisIsPassing = history[i].result === 'pass';82 var nextIsPassing = history[i + 1].result === 'pass';81 var thisIsPassing = history[i].result.failureType === 'pass'; 82 var nextIsPassing = history[i + 1].result.failureType === 'pass'; 83 83 if (thisIsPassing === nextIsPassing) 84 84 continue; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
r89841 r90120 31 31 start: function(buildName, callback, errorCallback) { 32 32 var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName; 33 const currentCachedDataVersion = 1; 33 34 if (PersistentCache.contains(cacheKey)) { 34 35 var cachedData = PersistentCache.get(cacheKey); 35 // Old versions of this function used to cache only the set of tests. 36 if ('tooManyFailures' in cachedData) { 36 if (cachedData.version === currentCachedDataVersion) { 37 37 callback(cachedData.tests, cachedData.tooManyFailures); 38 38 return; … … 40 40 } 41 41 42 var result = { tests: {}, tooManyFailures: false };42 var result = { tests: {}, tooManyFailures: false, version: currentCachedDataVersion }; 43 43 44 44 var parsedBuildName = this._builder.buildbot.parseBuildName(buildName); … … 71 71 72 72 testsForResultTable(/did not match expected results/).forEach(function(name) { 73 result.tests[name] = 'fail';73 result.tests[name] = { failureType: 'fail' }; 74 74 }); 75 75 testsForResultTable(/timed out/).forEach(function(name) { 76 result.tests[name] = 'timeout';76 result.tests[name] = { failureType: 'timeout' }; 77 77 }); 78 78 testsForResultTable(/tool to crash/).forEach(function(name) { 79 result.tests[name] = 'crash';79 result.tests[name] = { failureType: 'crash' }; 80 80 }); 81 81 testsForResultTable(/Web process to crash/).forEach(function(name) { 82 result.tests[name] = 'webprocess crash';82 result.tests[name] = { failureType: 'webprocess crash' }; 83 83 }); 84 84 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js
r90118 r90120 247 247 }, 248 248 249 _domForFailedTest: function(builder, buildName, testName, failureType) {249 _domForFailedTest: function(builder, buildName, testName, testResult) { 250 250 var result = document.createDocumentFragment(); 251 251 result.appendChild(document.createTextNode(testName)); 252 252 result.appendChild(document.createTextNode(' (')); 253 result.appendChild(this._domForFailureDiagnosis(builder, buildName, testName, failureType));253 result.appendChild(this._domForFailureDiagnosis(builder, buildName, testName, testResult)); 254 254 result.appendChild(document.createTextNode(')')); 255 255 return result; 256 256 }, 257 257 258 _domForFailureDiagnosis: function(builder, buildName, testName, failureType) {259 var diagnosticInfo = builder.failureDiagnosisTextAndURL(buildName, testName, failureType);258 _domForFailureDiagnosis: function(builder, buildName, testName, testResult) { 259 var diagnosticInfo = builder.failureDiagnosisTextAndURL(buildName, testName, testResult); 260 260 if (!diagnosticInfo) 261 return document.createTextNode( failureType);261 return document.createTextNode(testResult.failureType); 262 262 263 263 var textNode = document.createTextNode(diagnosticInfo.text); -
trunk/Tools/ChangeLog
r90118 r90120 1 2011-06-30 Adam Roben <aroben@apple.com> 2 3 Use objects instead of strings to represent a test result in TestFailures code 4 5 This will eventually allow us to store more than just the type of failure for each test. 6 (E.g., we can store the name of the crashing symbol for tests which crashed.) 7 8 Prep work for <http://webkit.org/b/63465> Links to crash logs on TestFailures page should 9 include the crashing symbol (like links in results.html do) 10 11 Reviewed by David Kilzer. 12 13 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: 14 (Builder.prototype.failureDiagnosisTextAndURL): Changed to expect a testResult object 15 instead of just a failureType string. 16 17 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyLayoutTestDetector.js: 18 (FlakyLayoutTestDetector.prototype.incorporateTestResults): Changed to store a 19 testResult-like object for passing tests. 20 (FlakyLayoutTestDetector.prototype.flakinessExamples): Changed to expect testResult-like 21 objects. 22 23 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: 24 (LayoutTestResultsLoader.prototype.start): Store a version number along with the cached data 25 so we can throw away cached data that's in an old format. Store a testResult object for each 26 test instead of just its failure type. 27 28 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js: 29 (ViewController.prototype._domForFailedTest): 30 (ViewController.prototype._domForFailureDiagnosis): 31 Changed to expect testResult objects instead of failureType strings. 32 1 33 2011-06-30 Adam Roben <aroben@apple.com> 2 34
Note:
See TracChangeset
for help on using the changeset viewer.