Changeset 87299 in webkit


Ignore:
Timestamp:
May 25, 2011 9:38:29 AM (13 years ago)
Author:
Adam Roben
Message:

Identify, rather than skip, builds where run-webkit-tests exited early due to too many failures

Fixes <http://webkit.org/b/61441> TestFailures page should show when run-webkit-tests
started exiting early due to too many crashes, timeouts, or failures

Reviewed by David Kilzer.

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

(Builder.prototype.getNumberOfFailingTests): Rather than returning -1 ("unknown") when
run-webkit-tests exits early due to too many failures, pass that information in another
argument to the callback.
(Builder.prototype.startFetchingBuildHistory): Updated the documentation comment to reflect
the new structure of the object passed to the callback.
(Builder.prototype._getFailingTests): Updated to expect a tooManyFailures boolean from
getNumberOfFailingTests and to pass that along to our own callbacks.
(Builder.prototype._incorporateBuildHistory): Updated to expect a tooManyFailures boolean
from _getFailingTests and to store that value in the history object.

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

(.info): Added.

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

(ViewController.prototype._displayBuilder): Updated for change in structure to the history
object and to add a note when run-webkit-tests exited early due to too many failures.
(ViewController.prototype._displayTesters): Renamed testersAndFailureCounts to
latestBuildInfos since each entry now contains more than just the tester and failure count.
Now displays a message for testers where the latest build exited early due to too many
failures. Updated to expect a tooManyFailures boolean from getNumberOfFailingTests and to
store that value in latestBuildInfos.

Location:
trunk/Tools
Files:
4 edited

Legend:

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

    r87148 r87299  
    103103            if (!layoutTestStep) {
    104104                self._cache[cacheKey] = -1;
    105                 callback(self._cache[cacheKey]);
     105                callback(self._cache[cacheKey], false);
    106106                return;
    107107            }
     
    110110                // run-webkit-tests never even ran.
    111111                self._cache[cacheKey] = -1;
    112                 callback(self._cache[cacheKey]);
     112                callback(self._cache[cacheKey], false);
    113113                return;
    114114            }
     
    117117                // All tests passed.
    118118                self._cache[cacheKey] = 0;
    119                 callback(self._cache[cacheKey]);
    120                 return;
    121             }
    122 
    123             if (/^Exiting early/.test(layoutTestStep.results[1][0])) {
    124                 // Too many tests crashed or timed out. We can't know for sure how many failed.
    125                 self._cache[cacheKey] = -1;
    126                 callback(self._cache[cacheKey]);
    127                 return;
    128             }
     119                callback(self._cache[cacheKey], false);
     120                return;
     121            }
     122
     123            var tooManyFailures = false;
     124            if (/^Exiting early/.test(layoutTestStep.results[1][0]))
     125                tooManyFailures = true;
    129126
    130127            var failureCount = layoutTestStep.results[1].reduce(function(sum, outputLine) {
     
    136133
    137134            self._cache[cacheKey] = failureCount;
    138             callback(failureCount);
     135            callback(failureCount, tooManyFailures);
    139136        });
    140137    },
     
    144141     * passed an object like the following:
    145142     * {
    146      *     'r2_1 (1)': {
    147      *         'css1/basic/class_as_selector2.html': 'fail',
     143     *     'r12347 (681)': {
     144     *         'tooManyFailures': false,
     145     *         'tests': {
     146     *             'css1/basic/class_as_selector2.html': 'fail',
     147     *         },
    148148     *     },
    149      *     'r1_1 (0)': {
    150      *         'css1/basic/class_as_selector.html': 'crash',
     149     *     'r12346 (680)': {
     150     *         'tooManyFailures': false,
     151     *         'tests': {},
     152     *     },
     153     *     'r12345 (679)': {
     154     *         'tooManyFailures': false,
     155     *         'tests': {
     156     *             'css1/basic/class_as_selector.html': 'crash',
     157     *         },
    151158     *     },
    152159     * },
     
    234241
    235242        var self = this;
    236         self.getNumberOfFailingTests(buildNumber, function(failingTestCount) {
     243        self.getNumberOfFailingTests(buildNumber, function(failingTestCount, tooManyFailures) {
    237244            if (failingTestCount < 0) {
    238245                // The number of failing tests couldn't be determined.
    239                 errorCallback(tests);
     246                errorCallback(tests, tooManyFailures);
    240247                return;
    241248            }
     
    243250            if (!failingTestCount) {
    244251                // All tests passed.
    245                 callback(tests);
     252                callback(tests, tooManyFailures);
    246253                return;
    247254            }
     
    278285                });
    279286
    280                 callback(tests);
     287                callback(tests, tooManyFailures);
    281288            },
    282289            function(xhr) {
    283290                // We failed to fetch results.html. run-webkit-tests must have aborted early.
    284                 errorCallback(tests);
     291                errorCallback(tests, tooManyFailures);
    285292            });
    286293        });
     
    291298        var nextBuildName = buildNames[buildIndex];
    292299
    293         this._getFailingTests(nextBuildName, function(tests) {
    294             history[nextBuildName] = {};
     300        this._getFailingTests(nextBuildName, function(tests, tooManyFailures) {
     301            history[nextBuildName] = {
     302                tooManyFailures: tooManyFailures,
     303                tests: {},
     304            };
    295305
    296306            for (var testName in tests) {
    297307                if (previousBuildName) {
    298                     if (!(testName in history[previousBuildName]))
     308                    if (!(testName in history[previousBuildName].tests))
    299309                        continue;
    300                     delete history[previousBuildName][testName];
     310                    delete history[previousBuildName].tests[testName];
    301311                }
    302                 history[nextBuildName][testName] = tests[testName];
    303             }
    304 
    305             callback(Object.keys(history[nextBuildName]).length);
     312                history[nextBuildName].tests[testName] = tests[testName];
     313            }
     314
     315            callback(Object.keys(history[nextBuildName].tests).length);
    306316        },
    307317        function(tests) {
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css

    r86766 r87299  
    22    list-style-type: none;
    33}
     4
    45dt {
    56    float: left;
     
    78    margin-right: 3px;
    89}
     10
    911dt::after {
    1012    content: ':';
    1113}
     14
     15.info {
     16    font-style: italic;
     17}
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js

    r87148 r87299  
    5050            var list = document.createElement('ol');
    5151            Object.keys(history).forEach(function(buildName, buildIndex, buildNameArray) {
    52                 if (!Object.keys(history[buildName]).length)
     52                if (!Object.keys(history[buildName].tests).length)
    5353                    return;
    5454                var dlItems = [
     
    6262                list.appendChild(item);
    6363
     64                if (history[buildName].tooManyFailures) {
     65                    var p = document.createElement('p');
     66                    p.className = 'info';
     67                    p.appendChild(document.createTextNode('run-webkit-tests exited early due to too many failures/crashes/timeouts'));
     68                    item.appendChild(p);
     69                }
     70
    6471                var testList = document.createElement('ol');
    65                 for (var testName in history[buildName]) {
     72                for (var testName in history[buildName].tests) {
    6673                    var testItem = document.createElement('li');
    67                     testItem.appendChild(self._domForFailedTest(builder, buildName, testName, history[buildName][testName]));
     74                    testItem.appendChild(self._domForFailedTest(builder, buildName, testName, history[buildName].tests[testName]));
    6875                    testList.appendChild(testItem);
    6976                }
     
    8289    _displayTesters: function() {
    8390        var list = document.createElement('ul');
    84         var testersAndFailureCounts = [];
     91        var latestBuildInfos = [];
    8592
    8693        function updateList() {
    87             testersAndFailureCounts.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });
     94            latestBuildInfos.sort(function(a, b) { return a.tester.name.localeCompare(b.tester.name) });
    8895            while (list.firstChild)
    8996                list.removeChild(list.firstChild);
    90             testersAndFailureCounts.forEach(function(testerAndFailureCount) {
    91                 var tester = testerAndFailureCount.tester;
    92                 var failureCount = testerAndFailureCount.failureCount;
    93 
     97            latestBuildInfos.forEach(function(buildInfo) {
    9498                var link = document.createElement('a');
    95                 link.href = '#/' + tester.name;
    96                 link.appendChild(document.createTextNode(tester.name));
     99                link.href = '#/' + buildInfo.tester.name;
     100                link.appendChild(document.createTextNode(buildInfo.tester.name));
    97101
    98102                var item = document.createElement('li');
    99103                item.appendChild(link);
    100                 item.appendChild(document.createTextNode(' (' + failureCount + ' failing tests)'));
     104                if (buildInfo.tooManyFailures)
     105                    item.appendChild(document.createTextNode(' (too many failures/crashes/timeouts)'));
     106                else
     107                    item.appendChild(document.createTextNode(' (' + buildInfo.failureCount + ' failing tests)'));
    101108                list.appendChild(item);
    102109            });
     
    108115                    if (buildNumber < 0)
    109116                        return;
    110                     tester.getNumberOfFailingTests(buildNumber, function(failureCount) {
     117                    tester.getNumberOfFailingTests(buildNumber, function(failureCount, tooManyFailures) {
    111118                        if (failureCount <= 0)
    112119                            return;
    113                         testersAndFailureCounts.push({ tester: tester, failureCount: failureCount });
     120                        latestBuildInfos.push({ tester: tester, failureCount: failureCount, tooManyFailures: tooManyFailures });
    114121                        updateList();
    115122                    });
  • trunk/Tools/ChangeLog

    r87274 r87299  
     12011-05-25  Adam Roben  <aroben@apple.com>
     2
     3        Identify, rather than skip, builds where run-webkit-tests exited early due to too many failures
     4
     5        Fixes <http://webkit.org/b/61441> TestFailures page should show when run-webkit-tests
     6        started exiting early due to too many crashes, timeouts, or failures
     7
     8        Reviewed by David Kilzer.
     9
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
     11        (Builder.prototype.getNumberOfFailingTests): Rather than returning -1 ("unknown") when
     12        run-webkit-tests exits early due to too many failures, pass that information in another
     13        argument to the callback.
     14        (Builder.prototype.startFetchingBuildHistory): Updated the documentation comment to reflect
     15        the new structure of the object passed to the callback.
     16        (Builder.prototype._getFailingTests): Updated to expect a tooManyFailures boolean from
     17        getNumberOfFailingTests and to pass that along to our own callbacks.
     18        (Builder.prototype._incorporateBuildHistory): Updated to expect a tooManyFailures boolean
     19        from _getFailingTests and to store that value in the history object.
     20
     21        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:
     22        (.info): Added.
     23
     24        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
     25        (ViewController.prototype._displayBuilder): Updated for change in structure to the history
     26        object and to add a note when run-webkit-tests exited early due to too many failures.
     27        (ViewController.prototype._displayTesters): Renamed testersAndFailureCounts to
     28        latestBuildInfos since each entry now contains more than just the tester and failure count.
     29        Now displays a message for testers where the latest build exited early due to too many
     30        failures. Updated to expect a tooManyFailures boolean from getNumberOfFailingTests and to
     31        store that value in latestBuildInfos.
     32
    1332011-05-24  Keishi Hattori  <keishi@webkit.org>
    234
Note: See TracChangeset for help on using the changeset viewer.