Changeset 90824 in webkit
- Timestamp:
- Jul 12, 2011 10:50:59 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
r90778 r90824 149 149 }, 0); 150 150 151 if (!result.failureCount) { 152 // run-webkit-tests exited with a non-zero exit status, but we 153 // didn't find any output about the number of failed tests. 154 // Something must have gone wrong (e.g., run-webkit-tests timed 155 // out and was killed by buildbot). 156 result.failureCount = -1; 157 } 158 151 159 PersistentCache.set(cacheKey, result); 152 160 callback(result.failureCount, result.tooManyFailures); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js
r90814 r90824 28 28 module("Builder"); 29 29 30 test("getNumberOfFailingTests shouldn't include leaks", 4, function() {30 function runGetNumberOfFailingTestsTest(jsonData, callback) { 31 31 var mockBuildbot = {}; 32 32 mockBuildbot.baseURL = 'http://example.com/'; … … 37 37 window.getResource = function(url, successCallback, errorCallback) { 38 38 var mockXHR = {}; 39 mockXHR.responseText = JSON.stringify({ 40 steps: [ 41 { 42 name: 'layout-test', 43 isStarted: true, 44 results: [ 45 2, 46 [ 47 "2178 total leaks found!", 48 "2 test cases (<1%) had incorrect layout", 49 "2 test cases (<1%) crashed", 50 ], 51 ], 52 }, 53 ], 54 }); 39 mockXHR.responseText = JSON.stringify(jsonData); 55 40 41 // FIXME: It would be better for this callback to happen 42 // asynchronously, to match what happens for real requests. 56 43 successCallback(mockXHR); 57 44 }; … … 66 53 }; 67 54 68 builder.getNumberOfFailingTests(1, function(failureCount, tooManyFailures) { 69 equal(failureCount, 4); 70 equal(tooManyFailures, false); 71 }); 55 builder.getNumberOfFailingTests(1, callback); 72 56 73 57 window.getResource = realGetResource; … … 75 59 window.PersistentCache = realPersistentCache; 76 60 equal(window.PersistentCache, realPersistentCache); 61 } 62 63 test("getNumberOfFailingTests shouldn't include leaks", 4, function() { 64 const jsonData = { 65 steps: [ 66 { 67 name: 'layout-test', 68 isStarted: true, 69 results: [ 70 2, 71 [ 72 "2178 total leaks found!", 73 "2 test cases (<1%) had incorrect layout", 74 "2 test cases (<1%) crashed", 75 ], 76 ], 77 }, 78 ], 79 }; 80 81 runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) { 82 equal(failureCount, 4); 83 equal(tooManyFailures, false); 84 }); 85 }); 86 87 test("getNumberOfFailingTests detects spurious run-webkit-tests failures", 4, function() { 88 const jsonData = { 89 steps: [ 90 { 91 isFinished: true, 92 isStarted: true, 93 name: "layout-test", 94 results: [ 95 2, 96 [ 97 "layout-test" 98 ] 99 ], 100 step_number: 7, 101 text: [ 102 "layout-test" 103 ], 104 times: [ 105 1310437736.00494, 106 1310440118.038023 107 ], 108 }, 109 ], 110 }; 111 112 runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) { 113 equal(failureCount, -1); 114 equal(tooManyFailures, false); 115 }); 77 116 }); 78 117 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
r90747 r90824 31 31 start: function(buildName, callback, errorCallback) { 32 32 var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName; 33 const currentCachedDataVersion = 4;33 const currentCachedDataVersion = 5; 34 34 if (PersistentCache.contains(cacheKey)) { 35 35 var cachedData = PersistentCache.get(cacheKey); -
trunk/Tools/ChangeLog
r90823 r90824 1 2011-07-12 Adam Roben <aroben@apple.com> 2 3 Teach TestFailures to recognize when run-webkit-tests gets killed by buildbot 4 5 Fixes <http://webkit.org/b/64358> TestFailures page thinks all tests passed in 6 http://build.webkit.org/builders/Windows%207%20Release%20(Tests)/builds/14672 7 8 Reviewed by Daniel Bates. 9 10 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: 11 (Builder.prototype.getNumberOfFailingTests): If run-webkit-tests exited with a non-zero 12 exit status but we didn't find any failure counts, assume that there was some error that 13 caused run-webkit-tests to die early (like being killed by buildbot due to a timeout). 14 15 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js: 16 Added a new test that shows that we get a failingTestCount of -1 when run-webkit-tests dies 17 early. 18 (runGetNumberOfFailingTestsTest): Moved most code here from the only pre-existing test in this 19 file. 20 21 * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: 22 (LayoutTestResultsLoader.prototype.start): Bump the cache number so old cached data that was 23 tainted by the bug fixed in this patch will be evicted. 24 1 25 2011-07-12 Adam Barth <abarth@webkit.org> 2 26
Note: See TracChangeset
for help on using the changeset viewer.