Title: [93111] trunk/Tools
Revision
93111
Author
[email protected]
Date
2011-08-16 09:27:54 -0700 (Tue, 16 Aug 2011)

Log Message

Teach TestFailures how to interpret unfinished test runs

Fixes <http://webkit.org/b/66309> TestFailures thinks all tests passed in
http://build.webkit.org/builders/Lion%20Intel%20Debug%20(Tests)/builds/136

Reviewed by David Kilzer.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
(Builder.prototype.getNumberOfFailingTests): Look for "isFinished" in the layout-test step
rather than "isStarted" so that we don't count builds for which the test run never finished.
Bumped the cache version to evict old, buggy cached data.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js:
Added a test for the above, and made a somewhat synthetic test more realistic by including
more of the actual JSON data from build.webkit.org.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
(LayoutTestResultsLoader.prototype.start): Bumped the cache version to evict old, buggy
cached data.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js (93110 => 93111)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js	2011-08-16 16:19:18 UTC (rev 93110)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js	2011-08-16 16:27:54 UTC (rev 93111)
@@ -100,7 +100,7 @@
 
     getNumberOfFailingTests: function(buildNumber, callback) {
         var cacheKey = this.name + '_getNumberOfFailingTests_' + buildNumber;
-        const currentCachedDataVersion = 1;
+        const currentCachedDataVersion = 2;
         if (PersistentCache.contains(cacheKey)) {
             var cachedData = PersistentCache.get(cacheKey);
             if (cachedData.version === currentCachedDataVersion) {
@@ -120,8 +120,8 @@
                 return;
             }
 
-            if (!('isStarted' in layoutTestStep)) {
-                // run-webkit-tests never even ran.
+            if (!('isFinished' in layoutTestStep)) {
+                // run-webkit-tests never even ran, or didn't finish running.
                 PersistentCache.set(cacheKey, result);
                 callback(result.failureCount, result.tooManyFailures);
                 return;

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js (93110 => 93111)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js	2011-08-16 16:19:18 UTC (rev 93110)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js	2011-08-16 16:27:54 UTC (rev 93111)
@@ -63,8 +63,9 @@
     const jsonData = {
         steps: [
             {
+                isFinished: true,
+                isStarted: true,
                 name: 'layout-test',
-                isStarted: true,
                 results: [
                     2,
                     [
@@ -179,4 +180,28 @@
     });
 });
 
+test("getNumberOfFailingTests treats unfinished test runs as errors", 4, function() {
+    const jsonData = {
+        steps: [
+            {
+                isStarted: true, 
+                name: "layout-test", 
+                step_number: 5, 
+                text: [
+                    "layout-tests running"
+                ], 
+                times: [
+                    1312989295.518481, 
+                    null
+                ]
+            }, 
+        ],
+    };
+
+    runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) {
+        equal(failureCount, -1);
+        equal(tooManyFailures, false);
+    });
+});
+
 })();

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js (93110 => 93111)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js	2011-08-16 16:19:18 UTC (rev 93110)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js	2011-08-16 16:27:54 UTC (rev 93111)
@@ -30,7 +30,7 @@
 LayoutTestResultsLoader.prototype = {
     start: function(buildName, callback, errorCallback) {
         var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
-        const currentCachedDataVersion = 6;
+        const currentCachedDataVersion = 7;
         if (PersistentCache.contains(cacheKey)) {
             var cachedData = PersistentCache.get(cacheKey);
             if (cachedData.version === currentCachedDataVersion) {

Modified: trunk/Tools/ChangeLog (93110 => 93111)


--- trunk/Tools/ChangeLog	2011-08-16 16:19:18 UTC (rev 93110)
+++ trunk/Tools/ChangeLog	2011-08-16 16:27:54 UTC (rev 93111)
@@ -1,5 +1,27 @@
 2011-08-16  Adam Roben  <[email protected]>
 
+        Teach TestFailures how to interpret unfinished test runs
+
+        Fixes <http://webkit.org/b/66309> TestFailures thinks all tests passed in
+        http://build.webkit.org/builders/Lion%20Intel%20Debug%20(Tests)/builds/136
+
+        Reviewed by David Kilzer.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
+        (Builder.prototype.getNumberOfFailingTests): Look for "isFinished" in the layout-test step
+        rather than "isStarted" so that we don't count builds for which the test run never finished.
+        Bumped the cache version to evict old, buggy cached data.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js:
+        Added a test for the above, and made a somewhat synthetic test more realistic by including
+        more of the actual JSON data from build.webkit.org.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
+        (LayoutTestResultsLoader.prototype.start): Bumped the cache version to evict old, buggy
+        cached data.
+
+2011-08-16  Adam Roben  <[email protected]>
+
         Make Apple's Windows port fall back to Lion results instead of SnowLeopard
 
         Apple's Windows port now uses Lion-era versions of CoreFoundation, ICU, etc., so in theory
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to