Changeset 89841 in webkit


Ignore:
Timestamp:
Jun 27, 2011 11:36:06 AM (13 years ago)
Author:
Adam Roben
Message:

Make LayoutTestResultsLoader cache whether old-run-webkit-tests exited early due to too many failures

Fixes <http://webkit.org/b/63470> TestFailures page for a particular builder forgets
old-run-webkit-tests exited early after reload

Reviewed by Anders Carlsson.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:

(LayoutTestResultsLoader.prototype.start): Store both the set of failing tests and whether
old-run-webkit-tests exited early due to too many failures in PersistentCache.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js

    r89838 r89841  
    3232        var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
    3333        if (PersistentCache.contains(cacheKey)) {
    34             callback(PersistentCache.get(cacheKey));
    35             return;
     34            var cachedData = PersistentCache.get(cacheKey);
     35            // Old versions of this function used to cache only the set of tests.
     36            if ('tooManyFailures' in cachedData) {
     37                callback(cachedData.tests, cachedData.tooManyFailures);
     38                return;
     39            }
    3640        }
    3741
    38         var tests = {};
     42        var result = { tests: {}, tooManyFailures: false };
    3943
    4044        var parsedBuildName = this._builder.buildbot.parseBuildName(buildName);
     
    5155
    5256                if (resultsHTMLSupportsTooManyFailuresInfo)
    53                     tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;
     57                    result.tooManyFailures = root.getElementsByClassName('stopped-running-early-message').length > 0;
    5458
    5559                function testsForResultTable(regex) {
     
    6771
    6872                testsForResultTable(/did not match expected results/).forEach(function(name) {
    69                     tests[name] = 'fail';
     73                    result.tests[name] = 'fail';
    7074                });
    7175                testsForResultTable(/timed out/).forEach(function(name) {
    72                     tests[name] = 'timeout';
     76                    result.tests[name] = 'timeout';
    7377                });
    7478                testsForResultTable(/tool to crash/).forEach(function(name) {
    75                     tests[name] = 'crash';
     79                    result.tests[name] = 'crash';
    7680                });
    7781                testsForResultTable(/Web process to crash/).forEach(function(name) {
    78                     tests[name] = 'webprocess crash';
     82                    result.tests[name] = 'webprocess crash';
    7983                });
    8084
    81                 PersistentCache.set(cacheKey, tests);
    82                 callback(tests, tooManyFailures);
     85                PersistentCache.set(cacheKey, result);
     86                callback(result.tests, result.tooManyFailures);
    8387            },
    8488            function(xhr) {
    8589                // We failed to fetch results.html. run-webkit-tests must have aborted early.
    86                 PersistentCache.set(cacheKey, tests);
    87                 errorCallback(tests, tooManyFailures);
     90                PersistentCache.set(cacheKey, result);
     91                errorCallback(result.tests, result.tooManyFailures);
    8892            });
    8993        }
     
    97101            if (failingTestCount < 0) {
    98102                // The number of failing tests couldn't be determined.
    99                 PersistentCache.set(cacheKey, tests);
    100                 errorCallback(tests, tooManyFailures);
     103                PersistentCache.set(cacheKey, result);
     104                errorCallback(result.tests, result.tooManyFailures);
    101105                return;
    102106            }
     
    104108            if (!failingTestCount) {
    105109                // All tests passed.
    106                 PersistentCache.set(cacheKey, tests);
    107                 callback(tests, tooManyFailures);
     110                PersistentCache.set(cacheKey, result);
     111                errorCallback(result.tests, result.tooManyFailures);
    108112                return;
    109113            }
  • trunk/Tools/ChangeLog

    r89840 r89841  
     12011-06-27  Adam Roben  <aroben@apple.com>
     2
     3        Make LayoutTestResultsLoader cache whether old-run-webkit-tests exited early due to too many
     4        failures
     5
     6        Fixes <http://webkit.org/b/63470> TestFailures page for a particular builder forgets
     7        old-run-webkit-tests exited early after reload
     8
     9        Reviewed by Anders Carlsson.
     10
     11        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
     12        (LayoutTestResultsLoader.prototype.start): Store both the set of failing tests and whether
     13        old-run-webkit-tests exited early due to too many failures in PersistentCache.
     14
    1152011-06-27  Adam Roben  <aroben@apple.com>
    216
Note: See TracChangeset for help on using the changeset viewer.