Title: [146926] trunk/Tools
Revision
146926
Author
jpar...@chromium.org
Date
2013-03-26 13:40:26 -0700 (Tue, 26 Mar 2013)

Log Message

Flakiness dashboard: simplify logic around which tests to show.
https://bugs.webkit.org/show_bug.cgi?id=113250

Reviewed by Ojan Vafai.

The different filters for showing results are only used for layout
tests, otherwise, we show everything.

Change the defaults to false (what layout tests used), and only
look at the values when viewing layout tests.

* TestResultServer/static-dashboards/flakiness_dashboard.js:
(htmlForTestsWithExpectationsButNoFailures):
(shouldHideTest):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (146925 => 146926)


--- trunk/Tools/ChangeLog	2013-03-26 20:33:55 UTC (rev 146925)
+++ trunk/Tools/ChangeLog	2013-03-26 20:40:26 UTC (rev 146926)
@@ -1,3 +1,20 @@
+2013-03-26  Julie Parent  <jpar...@chromium.org>
+
+        Flakiness dashboard: simplify logic around which tests to show.
+        https://bugs.webkit.org/show_bug.cgi?id=113250
+
+        Reviewed by Ojan Vafai.
+        
+        The different filters for showing results are only used for layout
+        tests, otherwise, we show everything.
+        
+        Change the defaults to false (what layout tests used), and only
+        look at the values when viewing layout tests.
+
+        * TestResultServer/static-dashboards/flakiness_dashboard.js:
+        (htmlForTestsWithExpectationsButNoFailures):
+        (shouldHideTest):
+
 2013-03-26  Isaac Levy  <il...@google.com>
 
         Update bots on test-results.appspot

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js (146925 => 146926)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js	2013-03-26 20:33:55 UTC (rev 146925)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js	2013-03-26 20:40:26 UTC (rev 146926)
@@ -250,12 +250,12 @@
     showLargeExpectations: false,
     legacyExpectationsSemantics: true,
     showChrome: true,
-    showCorrectExpectations: !g_history.isLayoutTestResults(),
-    showWrongExpectations: !g_history.isLayoutTestResults(),
-    showWontFixSkip: !g_history.isLayoutTestResults(),
-    showSlow: !g_history.isLayoutTestResults(),
-    showSkipped: !g_history.isLayoutTestResults(),
-    showUnexpectedPasses: !g_history.isLayoutTestResults(),
+    showCorrectExpectations: false,
+    showWrongExpectations: false,
+    showWontFixSkip: false,
+    showSlow: false,
+    showSkipped: false,
+    showUnexpectedPasses: false,
     expectationsUpdate: false,
     updateIndex: 0,
     resultsHeight: 300,
@@ -1314,9 +1314,8 @@
     var showUnexpectedPassesLink =  linkHTMLToToggleState('showUnexpectedPasses', 'tests that have not failed in last ' + g_resultsByBuilder[builder].buildNumbers.length + ' runs');
     var showSkippedLink = linkHTMLToToggleState('showSkipped', 'skipped tests in TestExpectations');
     
-
     var html = '';
-    if (tests.length || skippedPaths.length) {
+    if (g_history.isLayoutTestResults() && (tests.length || skippedPaths.length)) {
         var buildInfo = platformAndBuildType(builder);
         html += '<h2 style="display:inline-block">Expectations for ' + buildInfo.platform + '-' + buildInfo.buildType + '</h2> ';
         if (!g_history.dashboardSpecificState.showUnexpectedPasses && tests.length)
@@ -1343,6 +1342,10 @@
 // Returns whether we should exclude test results from the test table.
 function shouldHideTest(testResult)
 {
+    // For non-layout tests, we always show everything.
+    if (!g_history.isLayoutTestResults())
+        return false;
+
     if (testResult.isWontFixSkip)
         return !g_history.dashboardSpecificState.showWontFixSkip;
 

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js (146925 => 146926)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2013-03-26 20:33:55 UTC (rev 146925)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2013-03-26 20:40:26 UTC (rev 146926)
@@ -698,4 +698,45 @@
 
     historyInstance.invalidateQueryParameters({'testType': 'ui_tests'});
     notEqual(historyInstance.crossDashboardState.group, originalGroup, "group should have been invalidated");   
+});
+
+test('shouldHideTest', 10, function() {
+    var historyInstance = new history.History();
+    historyInstance.parseParameters();
+    // FIXME(jparent): Change to use the flakiness_dashboard's history object
+    // once it exists, rather than tracking global.
+    g_history = historyInstance;
+    var test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+
+    equal(shouldHideTest(test), true, 'default layout test, hide it.');
+    historyInstance.dashboardSpecificState.showCorrectExpectations = true;
+    equal(shouldHideTest(test), false, 'show correct expectations.');
+    historyInstance.dashboardSpecificState.showCorrectExpectations = false;
+
+    test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+    test.isWontFixSkip = true;
+    equal(shouldHideTest(test), true, 'by default hide these too');
+    historyInstance.dashboardSpecificState.showWontFixSkip = true;
+    equal(shouldHideTest(test), false, 'now we should show it');
+    historyInstance.dashboardSpecificState.showWontFixSkip = false;
+
+    test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+    test.isFlaky = true;
+    equal(shouldHideTest(test), false, 'we show flaky tests by default');
+    historyInstance.dashboardSpecificState.showFlaky = false;
+    equal(shouldHideTest(test), true, 'do not show flaky test');
+    historyInstance.dashboardSpecificState.showFlaky = true;
+
+    test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+    test.slowestNonTimeoutCrashTime = MIN_SECONDS_FOR_SLOW_TEST + 1;
+    equal(shouldHideTest(test), true, 'we hide slow tests by default');
+    historyInstance.dashboardSpecificState.showSlow = true;
+    equal(shouldHideTest(test), false, 'now show slow test');
+    historyInstance.dashboardSpecificState.showSlow = false;
+
+    test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+    historyInstance.crossDashboardState.testType = 'not layout tests';
+    equal(shouldHideTest(test), false, 'show all non layout tests');
+    test.isWontFixSkip = true;
+    equal(shouldHideTest(test), false, 'show all non layout tests, even if wont fix');
 });
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to