Log Message
Teach TestFailures to recognize when run-webkit-tests gets killed by buildbot
Fixes <http://webkit.org/b/64358> TestFailures page thinks all tests passed in http://build.webkit.org/builders/Windows%207%20Release%20(Tests)/builds/14672 Reviewed by Daniel Bates. * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js: (Builder.prototype.getNumberOfFailingTests): If run-webkit-tests exited with a non-zero exit status but we didn't find any failure counts, assume that there was some error that caused run-webkit-tests to die early (like being killed by buildbot due to a timeout). * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js: Added a new test that shows that we get a failingTestCount of -1 when run-webkit-tests dies early. (runGetNumberOfFailingTestsTest): Moved most code here from the only pre-existing test in this file. * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js: (LayoutTestResultsLoader.prototype.start): Bump the cache number so old cached data that was tainted by the bug fixed in this patch will be evicted.
Modified Paths
- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js
- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js
- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
- trunk/Tools/ChangeLog
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js (90823 => 90824)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js 2011-07-12 17:49:27 UTC (rev 90823)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js 2011-07-12 17:50:59 UTC (rev 90824)
@@ -148,6 +148,14 @@
return sum + parseInt(match[1], 10);
}, 0);
+ if (!result.failureCount) {
+ // run-webkit-tests exited with a non-zero exit status, but we
+ // didn't find any output about the number of failed tests.
+ // Something must have gone wrong (e.g., run-webkit-tests timed
+ // out and was killed by buildbot).
+ result.failureCount = -1;
+ }
+
PersistentCache.set(cacheKey, result);
callback(result.failureCount, result.tooManyFailures);
});
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js (90823 => 90824)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js 2011-07-12 17:49:27 UTC (rev 90823)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js 2011-07-12 17:50:59 UTC (rev 90824)
@@ -27,7 +27,7 @@
module("Builder");
-test("getNumberOfFailingTests shouldn't include leaks", 4, function() {
+function runGetNumberOfFailingTestsTest(jsonData, callback) {
var mockBuildbot = {};
mockBuildbot.baseURL = 'http://example.com/';
@@ -36,23 +36,10 @@
var realGetResource = window.getResource;
window.getResource = function(url, successCallback, errorCallback) {
var mockXHR = {};
- mockXHR.responseText = JSON.stringify({
- steps: [
- {
- name: 'layout-test',
- isStarted: true,
- results: [
- 2,
- [
- "2178 total leaks found!",
- "2 test cases (<1%) had incorrect layout",
- "2 test cases (<1%) crashed",
- ],
- ],
- },
- ],
- });
+ mockXHR.responseText = JSON.stringify(jsonData);
+ // FIXME: It would be better for this callback to happen
+ // asynchronously, to match what happens for real requests.
successCallback(mockXHR);
};
@@ -65,15 +52,67 @@
get: function() { },
};
- builder.getNumberOfFailingTests(1, function(failureCount, tooManyFailures) {
- equal(failureCount, 4);
- equal(tooManyFailures, false);
- });
+ builder.getNumberOfFailingTests(1, callback);
window.getResource = realGetResource;
equal(window.getResource, realGetResource);
window.PersistentCache = realPersistentCache;
equal(window.PersistentCache, realPersistentCache);
+}
+
+test("getNumberOfFailingTests shouldn't include leaks", 4, function() {
+ const jsonData = {
+ steps: [
+ {
+ name: 'layout-test',
+ isStarted: true,
+ results: [
+ 2,
+ [
+ "2178 total leaks found!",
+ "2 test cases (<1%) had incorrect layout",
+ "2 test cases (<1%) crashed",
+ ],
+ ],
+ },
+ ],
+ };
+
+ runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) {
+ equal(failureCount, 4);
+ equal(tooManyFailures, false);
+ });
});
+test("getNumberOfFailingTests detects spurious run-webkit-tests failures", 4, function() {
+ const jsonData = {
+ steps: [
+ {
+ isFinished: true,
+ isStarted: true,
+ name: "layout-test",
+ results: [
+ 2,
+ [
+ "layout-test"
+ ]
+ ],
+ step_number: 7,
+ text: [
+ "layout-test"
+ ],
+ times: [
+ 1310437736.00494,
+ 1310440118.038023
+ ],
+ },
+ ],
+ };
+
+ runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) {
+ equal(failureCount, -1);
+ equal(tooManyFailures, false);
+ });
+});
+
})();
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js (90823 => 90824)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js 2011-07-12 17:49:27 UTC (rev 90823)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js 2011-07-12 17:50:59 UTC (rev 90824)
@@ -30,7 +30,7 @@
LayoutTestResultsLoader.prototype = {
start: function(buildName, callback, errorCallback) {
var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
- const currentCachedDataVersion = 4;
+ const currentCachedDataVersion = 5;
if (PersistentCache.contains(cacheKey)) {
var cachedData = PersistentCache.get(cacheKey);
if (cachedData.version === currentCachedDataVersion) {
Modified: trunk/Tools/ChangeLog (90823 => 90824)
--- trunk/Tools/ChangeLog 2011-07-12 17:49:27 UTC (rev 90823)
+++ trunk/Tools/ChangeLog 2011-07-12 17:50:59 UTC (rev 90824)
@@ -1,3 +1,27 @@
+2011-07-12 Adam Roben <[email protected]>
+
+ Teach TestFailures to recognize when run-webkit-tests gets killed by buildbot
+
+ Fixes <http://webkit.org/b/64358> TestFailures page thinks all tests passed in
+ http://build.webkit.org/builders/Windows%207%20Release%20(Tests)/builds/14672
+
+ Reviewed by Daniel Bates.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
+ (Builder.prototype.getNumberOfFailingTests): If run-webkit-tests exited with a non-zero
+ exit status but we didn't find any failure counts, assume that there was some error that
+ caused run-webkit-tests to die early (like being killed by buildbot due to a timeout).
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js:
+ Added a new test that shows that we get a failingTestCount of -1 when run-webkit-tests dies
+ early.
+ (runGetNumberOfFailingTestsTest): Moved most code here from the only pre-existing test in this
+ file.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
+ (LayoutTestResultsLoader.prototype.start): Bump the cache number so old cached data that was
+ tainted by the bug fixed in this patch will be evicted.
+
2011-07-12 Adam Barth <[email protected]>
cr-linux-ews complains about tests that aren't actually failing
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
