Changeset 91123 in webkit


Ignore:
Timestamp:
Jul 15, 2011 3:42:12 PM (13 years ago)
Author:
Adam Roben
Message:

Teach TestFailures how to detect interrupted build steps

Fixes <http://webkit.org/b/64619> TestFailures page thinks all tests passed in
http://build.webkit.org/builders/SnowLeopard%20Intel%20Release%20(WebKit2%20Tests)/builds/13401

Reviewed by Daniel Bates.

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

(Builder.prototype.getNumberOfFailingTests): If the build step has a result code of 4, the
build step was interrupted. Treat it as an error (by returning a failureCount of -1).

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

Added a test for the above.

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

(LayoutTestResultsLoader.prototype.start): Bumped the cache version to evict old, buggy
cache data that was afflicted by the above bug.

Location:
trunk/Tools
Files:
4 edited

Legend:

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

    r90921 r91123  
    136136            }
    137137
     138            if (layoutTestStep.results[0] === 4) {
     139                // This build step was interrupted (perhaps due to the build slave restarting).
     140                PersistentCache.set(cacheKey, result);
     141                callback(result.failureCount, result.tooManyFailures);
     142                return;
     143            }
     144
    138145            if (/Exiting early/.test(layoutTestStep.results[1][0]))
    139146                result.tooManyFailures = true;
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js

    r90921 r91123  
    149149});
    150150
     151test("getNumberOfFailingTests treats build step interruptions as errors", 4, function() {
     152    const jsonData = {
     153        steps: [
     154            {
     155                isFinished: true,
     156                isStarted: true,
     157                name: "layout-test",
     158                results: [
     159                  4,
     160                  [
     161                      "interrupted",
     162                  ]
     163                ],
     164                step_number: 5,
     165                text: [
     166                    "layout-test",
     167                    "interrupted",
     168                ],
     169                times: [
     170                    1310599204.1231229,
     171                    1310600152.973659,
     172                ]
     173            },
     174        ],
     175    };
     176
     177    runGetNumberOfFailingTestsTest(jsonData, function(failureCount, tooManyFailures) {
     178        equal(failureCount, -1);
     179        equal(tooManyFailures, false);
     180    });
     181});
     182
    151183})();
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js

    r90824 r91123  
    3131    start: function(buildName, callback, errorCallback) {
    3232        var cacheKey = 'LayoutTestResultsLoader.' + this._builder.name + '.' + buildName;
    33         const currentCachedDataVersion = 5;
     33        const currentCachedDataVersion = 6;
    3434        if (PersistentCache.contains(cacheKey)) {
    3535            var cachedData = PersistentCache.get(cacheKey);
  • trunk/Tools/ChangeLog

    r91121 r91123  
     12011-07-15  Adam Roben  <aroben@apple.com>
     2
     3        Teach TestFailures how to detect interrupted build steps
     4
     5        Fixes <http://webkit.org/b/64619> TestFailures page thinks all tests passed in
     6        http://build.webkit.org/builders/SnowLeopard%20Intel%20Release%20(WebKit2%20Tests)/builds/13401
     7
     8        Reviewed by Daniel Bates.
     9
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
     11        (Builder.prototype.getNumberOfFailingTests): If the build step has a result code of 4, the
     12        build step was interrupted. Treat it as an error (by returning a failureCount of -1).
     13
     14        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder_unittests.js:
     15        Added a test for the above.
     16
     17        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/LayoutTestResultsLoader.js:
     18        (LayoutTestResultsLoader.prototype.start): Bumped the cache version to evict old, buggy
     19        cache data that was afflicted by the above bug.
     20
    1212011-07-15  Eric Seidel  <eric@webkit.org>
    222
Note: See TracChangeset for help on using the changeset viewer.