Flakiness dashboard assumes there must be ToT tests
authorjparent@chromium.org <jparent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 02:16:48 +0000 (02:16 +0000)
committerjparent@chromium.org <jparent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2013 02:16:48 +0000 (02:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107155

Remove group as a default parameter, since we can't actually know
the name of a group initially.  Instead, introduces
currentBuilderGroupName which returns the current builder group
if it has been explicitly set, or picks the first one available
as a default. Allows us to remove some extra code tracking this
stuff as well.

Reviewed by Ojan Vafai.

* TestResultServer/static-dashboards/dashboard_base.js:
(parseCrossDashboardParameters):
(currentBuilderGroupName):
(currentBuilderGroup):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(platformAndBuildType):
* TestResultServer/static-dashboards/loader.js:
(.):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestResultServer/static-dashboards/dashboard_base.js
Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
Tools/TestResultServer/static-dashboards/loader.js

index 584a0a5..d477c2a 100644 (file)
@@ -1,3 +1,26 @@
+2013-01-17  Julie Parent  <jparent@chromium.org>
+
+        Flakiness dashboard assumes there must be ToT tests
+        https://bugs.webkit.org/show_bug.cgi?id=107155
+
+        Remove group as a default parameter, since we can't actually know
+        the name of a group initially.  Instead, introduces 
+        currentBuilderGroupName which returns the current builder group
+        if it has been explicitly set, or picks the first one available
+        as a default. Allows us to remove some extra code tracking this
+        stuff as well.
+        
+        Reviewed by Ojan Vafai.
+
+        * TestResultServer/static-dashboards/dashboard_base.js:
+        (parseCrossDashboardParameters):
+        (currentBuilderGroupName):
+        (currentBuilderGroup):
+        * TestResultServer/static-dashboards/flakiness_dashboard.js:
+        (platformAndBuildType):
+        * TestResultServer/static-dashboards/loader.js:
+        (.):
+
 2013-01-16  Ryosuke Niwa  <rniwa@webkit.org>
 
         Remove NodeListsNodeData when it's no longer needed
index 5e56d9d..f31f008 100644 (file)
@@ -196,7 +196,6 @@ function handleValidHashParameterWrapper(key, value)
 }
 
 var g_defaultCrossDashboardStateValues = {
-    group: '@ToT - chromium.org',
     showAllRuns: false,
     testType: 'layout-tests',
     useTestData: false,
@@ -297,8 +296,6 @@ function parseCrossDashboardParameters()
         parseParameter(parameters, parameterName);
 
     fillMissingValues(g_crossDashboardState, g_defaultCrossDashboardStateValues);
-    if (currentBuilderGroup() === undefined)
-        g_crossDashboardState.group = g_defaultCrossDashboardStateValues.group;
 }
 
 function parseDashboardSpecificParameters()
@@ -412,9 +409,14 @@ function currentBuilderGroupCategory()
     }
 }
 
+function currentBuilderGroupName()
+{
+    return g_crossDashboardState.group || Object.keys(currentBuilderGroupCategory())[0];
+}
+
 function currentBuilderGroup()
 {
-    return currentBuilderGroupCategory()[g_crossDashboardState.group]
+    return currentBuilderGroupCategory()[currentBuilderGroupName()];
 }
 
 function currentBuilders()
index 592f53e..21f5c6a 100644 (file)
@@ -385,7 +385,7 @@ function platformAndBuildType(builderName)
         var builderNameUpperCase = builderName.toUpperCase();
         
         var platform = '';
-        if (isLayoutTestResults() && g_crossDashboardState.group == '@ToT - webkit.org' && !stringContains(builderNameUpperCase, 'CHROMIUM'))
+        if (isLayoutTestResults() && currentBuilderGroupName() == '@ToT - webkit.org' && !stringContains(builderNameUpperCase, 'CHROMIUM'))
             platform = nonChromiumPlatform(builderNameUpperCase);
         else
             platform = chromiumPlatform(builderNameUpperCase);
index 39d4580..1e2d646 100644 (file)
@@ -94,7 +94,7 @@ loader.Loader.prototype = {
     },
     _loadBuildersList: function()
     {
-        loadBuildersList(g_crossDashboardState.group, g_crossDashboardState.testType);
+        loadBuildersList(currentBuilderGroupName(), g_crossDashboardState.testType);
         this._loadNext();
     },
     _loadResultsFiles: function()