Changeset 91278 in webkit


Ignore:
Timestamp:
Jul 19, 2011 11:51:27 AM (13 years ago)
Author:
Adam Roben
Message:

Make TestFailures show existing bugs and a new bug link for flaky tests

Fixes <http://webkit.org/b/63728> TestFailures page should make it easy to file bugs about
flaky tests
and
<http://webkit.org/b/63830> TestFailures page doesn't show related bugs for possibly-flaky
tests, but should

Reviewed by Sam Weinig.

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

Added. This is what's used to file new bugs about flaky tests.
(FlakyTestBugForm): Calls up to the base class, stores the arguments, and sets our
title, description, and URL.

(FlakyTestBugForm.prototype._createBugDescription):
(FlakyTestBugForm.prototype._createBugTitle):
These do what they say.

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

Added. Tests of the above.

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

(#failure-history > li):
(#possibly-flaky-tests > li):
(#failure-history > li, #possibly-flaky-tests > li):
(#possibly-flaky-tests > li > :first-child):
(.flakiness-examples-list):
Styling to account for the new elements.

(.expandable):
(.expanded > .expandable):
Generalized the .flakiness-example-list code to a generic .expandable class. Removed the
transition properties because we can't transition to/from 'auto' (but really would like
to!).

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

(ViewController.prototype._displayBuilder): Moved code to create the FailingTestsBugForm
here from _domForNewAndExistingBugs. Updated for changes to _domForPossiblyFlakyTests.
(ViewController.prototype._domForNewAndExistingBugs): Changed to take a NewBugForm as an
argument instead of creating one ourselves.
(ViewController.prototype._domForPossiblyFlakyTests): Changed to take all analyzed builds as
an argument instead of just the number of analyzed builds. Put the examples list inside a
container <div>, which is also used to hold the new/existing bugs UI. Removed code to deal
with animating the height of the examples list; we don't do this anymore because it's hard
to make it work correctly with the asynchronous loading of existing bugs. When we populate
the examples list, also set up the new/existing bug UI.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in

FlakyTestBugForm.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:

Pull in FlakyTestBugForm and its tests.

Location:
trunk/Tools
Files:
2 added
5 edited

Legend:

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

    r91119 r91278  
    3232#failure-history > li {
    3333    margin-bottom: 10px;
    34     padding: 10px 10px 10px 50px;
     34    padding: 10px;
    3535}
    3636
    3737#possibly-flaky-tests > li {
    38     padding: 1px;
     38    padding: 1px 0px;
    3939}
    4040
    4141#failure-history > li, #possibly-flaky-tests > li {
    4242    background-color: #f0f0f0;
     43    padding-left: 50px;
     44}
     45
     46#possibly-flaky-tests > li > :first-child {
     47    margin-left: -50px;
     48}
     49
     50.flakiness-examples-list {
     51    padding: 0;
    4352}
    4453
     
    7685}
    7786
    78 .flakiness-examples-list {
    79     -webkit-transition: height 0.25s;
     87.expandable {
    8088    height: 0px;
    8189    overflow: hidden;
    8290}
     91
     92.expanded > .expandable {
     93    height: auto;
     94}
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js

    r91068 r91278  
    104104                item.appendChild(self._domForRegressionRange(builder, buildName, passingBuildName, failingTestNames));
    105105
    106                 if (passingBuildName || !stillFetchingData)
    107                     item.appendChild(self._domForNewAndExistingBugs(builder, buildName, passingBuildName, failingTestNames));
     106                if (passingBuildName || !stillFetchingData) {
     107                    var bugForm = new FailingTestsBugForm(self._bugzilla, self._trac, builder, buildName, passingBuildName, failingTestNames);
     108                    item.appendChild(self._domForNewAndExistingBugs(builder, failingTestNames, bugForm))
     109                }
    108110            });
    109111
    110112            self._mainContentElement.removeAllChildren();
    111113            self._mainContentElement.appendChild(list);
    112             self._mainContentElement.appendChild(self._domForPossiblyFlakyTests(builder, data.possiblyFlaky, buildNames.length));
     114            self._mainContentElement.appendChild(self._domForPossiblyFlakyTests(builder, data.possiblyFlaky, buildNames));
    113115
    114116            if (!stillFetchingData)
     
    324326    },
    325327
    326     _domForNewAndExistingBugs: function(tester, failingBuildName, passingBuildName, failingTests) {
     328    _domForNewAndExistingBugs: function(tester, failingTests, bugForm) {
    327329        var result = document.createDocumentFragment();
    328330
     
    386388        });
    387389
    388         var bugForm = new FailingTestsBugForm(this._bugzilla, this._trac, tester, failingBuildName, passingBuildName, failingTests);
    389 
    390390        var form = bugForm.domElement();
    391391        result.appendChild(form);
     
    401401    },
    402402
    403     _domForPossiblyFlakyTests: function(builder, possiblyFlakyTestData, buildCount) {
     403    _domForPossiblyFlakyTests: function(builder, possiblyFlakyTestData, allBuilds) {
    404404        var result = document.createDocumentFragment();
    405405        var flakyTests = Object.keys(possiblyFlakyTestData);
     
    429429            var failures = possiblyFlakyTestData[testName];
    430430
    431             item.appendChild(document.createTextNode(testName + ' (failed ' + failures.length + ' out of ' + buildCount + ' times)'));
    432 
    433             var failureList = document.createElement('ol');
    434             item.appendChild(failureList);
    435 
    436             failureList.className = 'flakiness-examples-list';
     431            item.appendChild(document.createTextNode(testName + ' (failed ' + failures.length + ' out of ' + allBuilds.length + ' times)'));
     432
     433            var container = document.createElement('div');
     434            item.appendChild(container);
     435
     436            container.className = 'expandable';
    437437
    438438            disclosureTriangle.addEventListener('click', function() {
    439439                item.toggleStyleClass('expanded');
    440                 if (!item.hasStyleClass('expanded')) {
    441                     failureList.style.height = '';
     440                if (!item.hasStyleClass('expanded'))
    442441                    return;
    443                 }
    444 
    445                 if (!failureList.firstChild) {
     442
     443                if (!container.firstChild) {
     444                    var failureList = document.createElement('ol');
     445                    container.appendChild(failureList);
     446
     447                    failureList.className = 'flakiness-examples-list';
     448
    446449                    failureList.appendChildren(failures.map(function(historyItem) {
    447450                        var item = document.createElement('li');
     
    451454                        return item;
    452455                    }));
     456
     457                    var failingBuildNames = failures.map(function(historyItem) { return historyItem.build });
     458                    var bugForm = new FlakyTestBugForm(self._bugzilla, builder, failingBuildNames, testName, allBuilds.last(), allBuilds[0], allBuilds.length);
     459                    container.appendChild(self._domForNewAndExistingBugs(builder, [testName], bugForm));
    453460                }
    454 
    455                 // CSS transitions can't transition to a value of 'auto', so we find out the actual
    456                 // value using getComputedStyle and transition to that.
    457                 failureList.style.height = 'auto';
    458                 failureList.style.height = getComputedStyle(failureList).height;
    459461            });
    460462
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html

    r91272 r91278  
    3232    <script src="TestRelatedBugForm.js"></script>
    3333    <script src="FailingTestsBugForm.js"></script>
     34    <script src="FlakyTestBugForm.js"></script>
    3435
    3536    <script src="Bugzilla.js"></script>
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html

    r91272 r91278  
    2828<script src="FailingTestsBugForm_unittests.js"></script>
    2929
     30<script src="FlakyTestBugForm.js"></script>
     31<script src="FlakyTestBugForm_unittests.js"></script>
     32
    3033<script src="FlakyLayoutTestDetector.js"></script>
    3134<script src="FlakyLayoutTestDetector_unittests.js"></script>
  • trunk/Tools/ChangeLog

    r91273 r91278  
     12011-07-19  Adam Roben  <aroben@apple.com>
     2
     3        Make TestFailures show existing bugs and a new bug link for flaky tests
     4
     5        Fixes <http://webkit.org/b/63728> TestFailures page should make it easy to file bugs about
     6        flaky tests
     7        and
     8        <http://webkit.org/b/63830> TestFailures page doesn't show related bugs for possibly-flaky
     9        tests, but should
     10
     11        Reviewed by Sam Weinig.
     12
     13        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyTestBugForm.js:
     14        Added. This is what's used to file new bugs about flaky tests.
     15        (FlakyTestBugForm): Calls up to the base class, stores the arguments, and sets our
     16        title, description, and URL.
     17
     18        (FlakyTestBugForm.prototype._createBugDescription):
     19        (FlakyTestBugForm.prototype._createBugTitle):
     20        These do what they say.
     21
     22        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/FlakyTestBugForm_unittests.js:
     23        Added. Tests of the above.
     24
     25        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/TestFailures.css:
     26        (#failure-history > li):
     27        (#possibly-flaky-tests > li):
     28        (#failure-history > li, #possibly-flaky-tests > li):
     29        (#possibly-flaky-tests > li > :first-child):
     30        (.flakiness-examples-list):
     31        Styling to account for the new elements.
     32
     33        (.expandable):
     34        (.expanded > .expandable):
     35        Generalized the .flakiness-example-list code to a generic .expandable class. Removed the
     36        transition properties because we can't transition to/from 'auto' (but really would like
     37        to!).
     38
     39        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/ViewController.js:
     40        (ViewController.prototype._displayBuilder): Moved code to create the FailingTestsBugForm
     41        here from _domForNewAndExistingBugs. Updated for changes to _domForPossiblyFlakyTests.
     42        (ViewController.prototype._domForNewAndExistingBugs): Changed to take a NewBugForm as an
     43        argument instead of creating one ourselves.
     44        (ViewController.prototype._domForPossiblyFlakyTests): Changed to take all analyzed builds as
     45        an argument instead of just the number of analyzed builds. Put the examples list inside a
     46        container <div>, which is also used to hold the new/existing bugs UI. Removed code to deal
     47        with animating the height of the examples list; we don't do this anymore because it's hard
     48        to make it work correctly with the asynchronous loading of existing bugs. When we populate
     49        the examples list, also set up the new/existing bug UI.
     50
     51        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html: Pull in
     52        FlakyTestBugForm.
     53
     54        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
     55        Pull in FlakyTestBugForm and its tests.
     56
    1572011-07-19  Ryosuke Niwa  <rniwa@webkit.org>
    258
Note: See TracChangeset for help on using the changeset viewer.