Title: [90656] trunk/Tools
Revision
90656
Author
[email protected]
Date
2011-07-08 12:51:16 -0700 (Fri, 08 Jul 2011)

Log Message

Make TestFailures remember that run-webkit-tests timed out, even across reloads

Fixes <http://webkit.org/b/64193> TestFailures page incorrectly thinks all tests passed in
http://build.webkit.org/builders/Windows%207%20Release%20(Tests)/builds/14589 after a reload

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
(LayoutTestResultsLoader.prototype.start): Store an "error" attribute in the cached data.
When true, it indicates that there was an error retrieving the results for this build and
that the errorCallback should be called.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js	2011-07-08 19:47:37 UTC (rev 90655)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js	2011-07-08 19:51:16 UTC (rev 90656)
@@ -30,16 +30,19 @@
 LayoutTestResultsLoader.prototype = {
     start: function(buildName, callback, errorCallback) {
         var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
-        const currentCachedDataVersion = 2;
+        const currentCachedDataVersion = 3;
         if (PersistentCache.contains(cacheKey)) {
             var cachedData = PersistentCache.get(cacheKey);
             if (cachedData.version === currentCachedDataVersion) {
-                callback(cachedData.tests, cachedData.tooManyFailures);
+                if (cachedData.error)
+                    errorCallback(cachedData.tests, cachedData.tooManyFailures);
+                else
+                    callback(cachedData.tests, cachedData.tooManyFailures);
                 return;
             }
         }
 
-        var result = { tests: {}, tooManyFailures: false, version: currentCachedDataVersion };
+        var result = { tests: {}, tooManyFailures: false, error: false, version: currentCachedDataVersion };
 
         function cacheParseResultsAndCallCallback(parseResult) {
             result.tests = parseResult.tests;
@@ -53,6 +56,7 @@
         self._fetchAndParseNRWTResults(buildName, cacheParseResultsAndCallCallback, function() {
             self._fetchAndParseORWTResults(buildName, cacheParseResultsAndCallCallback, function() {
                 // We couldn't fetch results for this build.
+                result.error = true;
                 PersistentCache.set(cacheKey, result);
                 errorCallback(result.tests, result.tooManyFailures);
             });

Modified: trunk/Tools/ChangeLog (90655 => 90656)


--- trunk/Tools/ChangeLog	2011-07-08 19:47:37 UTC (rev 90655)
+++ trunk/Tools/ChangeLog	2011-07-08 19:51:16 UTC (rev 90656)
@@ -1,3 +1,17 @@
+2011-07-08  Adam Roben  <[email protected]>
+
+        Make TestFailures remember that run-webkit-tests timed out, even across reloads
+
+        Fixes <http://webkit.org/b/64193> TestFailures page incorrectly thinks all tests passed in
+        http://build.webkit.org/builders/Windows%207%20Release%20(Tests)/builds/14589 after a reload
+
+        Reviewed by Daniel Bates.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
+        (LayoutTestResultsLoader.prototype.start): Store an "error" attribute in the cached data.
+        When true, it indicates that there was an error retrieving the results for this build and
+        that the errorCallback should be called.
+
 2011-07-08  Adam Barth  <[email protected]>
 
         Teach garden-o-matic how to display test results
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to