Make TestFailures remember that run-webkit-tests timed out, even across reloads
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2011 19:51:16 +0000 (19:51 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jul 2011 19:51:16 +0000 (19:51 +0000)
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90656 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js
Tools/ChangeLog

index 48bb387..5a42461 100644 (file)
@@ -30,16 +30,19 @@ function LayoutTestResultsLoader(builder) {
 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 @@ LayoutTestResultsLoader.prototype = {
         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);
             });
index 8102ba2..8bd9974 100644 (file)
@@ -1,3 +1,17 @@
+2011-07-08  Adam Roben  <aroben@apple.com>
+
+        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  <abarth@webkit.org>
 
         Teach garden-o-matic how to display test results