Title: [91705] trunk/Tools
Revision
91705
Author
[email protected]
Date
2011-07-25 14:01:45 -0700 (Mon, 25 Jul 2011)

Log Message

by default hide tests that have passes for all recorded runs
https://bugs.webkit.org/show_bug.cgi?id=65127

Reviewed by Adam Barth.

This is part of simplifying the default views of the dashboard to
make it show less information for the common use cases.

* TestResultServer/static-dashboards/flakiness_dashboard.html:
* TestResultServer/static-dashboards/flakiness_dashboard_tests.js:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (91704 => 91705)


--- trunk/Tools/ChangeLog	2011-07-25 20:45:12 UTC (rev 91704)
+++ trunk/Tools/ChangeLog	2011-07-25 21:01:45 UTC (rev 91705)
@@ -1,5 +1,18 @@
 2011-07-25  Ojan Vafai  <[email protected]>
 
+        by default hide tests that have passes for all recorded runs
+        https://bugs.webkit.org/show_bug.cgi?id=65127
+
+        Reviewed by Adam Barth.
+
+        This is part of simplifying the default views of the dashboard to
+        make it show less information for the common use cases.
+
+        * TestResultServer/static-dashboards/flakiness_dashboard.html:
+        * TestResultServer/static-dashboards/flakiness_dashboard_tests.js:
+
+2011-07-25  Ojan Vafai  <[email protected]>
+
         stop generating expectations.json now that it's unused
         https://bugs.webkit.org/show_bug.cgi?id=65130
 

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html (91704 => 91705)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html	2011-07-25 20:45:12 UTC (rev 91704)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html	2011-07-25 21:01:45 UTC (rev 91705)
@@ -180,7 +180,8 @@
     border: 1px solid lightgray;
     height: 0px;
 }
-#passing-tests {
+#passing-tests,
+#skipped-tests {
     -webkit-column-count: 3;
     -webkit-column-gap: 25px;
     -webkit-column-rule: 1px dashed black;
@@ -419,6 +420,7 @@
     case 'legacyExpectationsSemantics':
     case 'showSkipped':
     case 'showSlow':
+    case 'showUnexpectedPasses':
     case 'showWontFixSkip':
     case 'expectationsUpdate':
     case 'showRunsOnBuilderPage':
@@ -442,6 +444,7 @@
     showWontFixSkip: !isLayoutTestResults(),
     showSlow: !isLayoutTestResults(),
     showSkipped: !isLayoutTestResults(),
+    showUnexpectedPasses: !isLayoutTestResults(),
     expectationsUpdate: false,
     showRunsOnBuilderPage: false,
     updateIndex: 0,
@@ -1334,19 +1337,21 @@
     var open = '<div _onclick_="selectContents(this)">';
 
     if (tests.length) {
-        html +=  '<h3>Have not failed in last ' + g_resultsByBuilder[builder].buildNumbers.length + ' runs.</h3><div id="passing-tests">';
-
-        for (var i = 0; i < tests.length; i++)
-            html += open + tests[i].test + '</div>';
-
-        html += '</div>';
+        html +=  '<h3>' + linkHTMLToToggleState('showUnexpectedPasses', 'tests that have not failed in last ' + g_resultsByBuilder[builder].buildNumbers.length + ' runs.') + '</h3>';
+        
+        if (g_currentState.showUnexpectedPasses) {
+            html += '<div id="passing-tests">';
+            for (var i = 0; i < tests.length; i++)
+                html += open + tests[i].test + '</div>';
+            html += '</div>';
+        }
     }
 
     if (skippedPaths.length) {
-        html += '<h3>' + linkHTMLToToggleState('showSkipped', 'Skipped tests in test_expectations.txt') + '</h3>';
+        html += '<h3>' + linkHTMLToToggleState('showSkipped', 'skipped tests in test_expectations.txt') + '</h3>';
 
         if (g_currentState.showSkipped)
-            html += '<div id="passing-tests">' + open + skippedPaths.join('</div>' + open) + '</div></div>';
+            html += '<div id="skipped-tests">' + open + skippedPaths.join('</div>' + open) + '</div></div>';
     }
     return html;
 }

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js (91704 => 91705)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js	2011-07-25 20:45:12 UTC (rev 91704)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_tests.js	2011-07-25 21:01:45 UTC (rev 91705)
@@ -329,9 +329,33 @@
     g_currentState.testType = 'layout-tests';
     g_currentState.tests = 'foo/bar.FLAKY_foo.html';
     assertEquals(substringList().toString(), 'foo/bar.FLAKY_foo.html');
+}
 
+function testHtmlForTestsWithExpectationsButNoFailures()
+{
+    var builder = 'WebKit Win';
+    g_perBuilderWithExpectationsButNoFailures[builder] = ['passing-test1.html', 'passing-test2.html'];
+    g_perBuilderSkippedPaths[builder] = ['skipped-test1.html'];
+    g_resultsByBuilder[builder] = { buildNumbers: [5, 4, 3, 1] };
+
+    g_currentState.showUnexpectedPasses = true;
+    g_currentState.showSkipped = true;
+    
+    var container = document.createElement('div');
+    container.innerHTML = htmlForTestsWithExpectationsButNoFailures(builder);
+    assertEquals(container.querySelectorAll('#passing-tests > div').length, 2);
+    assertEquals(container.querySelectorAll('#skipped-tests > div').length, 1);
+    
+    g_currentState.showUnexpectedPasses = false;
+    g_currentState.showSkipped = false;
+    
+    var container = document.createElement('div');
+    container.innerHTML = htmlForTestsWithExpectationsButNoFailures(builder);
+    assertEquals(container.querySelectorAll('#passing-tests > div').length, 0);
+    assertEquals(container.querySelectorAll('#skipped-tests > div').length, 0);
 }
 
+
 function runTests()
 {
     document.body.innerHTML = '<pre id=unittest-results></pre>';
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to