| Index: dashboard/dashboard/speed_releasing_test.py
|
| diff --git a/dashboard/dashboard/speed_releasing_test.py b/dashboard/dashboard/speed_releasing_test.py
|
| index f8f777beb1eec7e878865a09e9b18e2ff49daf03..7672f2b5d052e00b0c43dfbd4a5ff07d3570abd5 100644
|
| --- a/dashboard/dashboard/speed_releasing_test.py
|
| +++ b/dashboard/dashboard/speed_releasing_test.py
|
| @@ -15,9 +15,9 @@ from dashboard.models import table_config
|
| from dashboard.models import graph_data
|
|
|
| _SAMPLE_BOTS = ['ChromiumPerf/win', 'ChromiumPerf/linux']
|
| -_SAMPLE_TESTS = ['my_test_suite/my_test_*', 'my_test_suite/my_other_test_*']
|
| -_SAMPLE_LAYOUT = ('{ "my_test_suite/my_test_*": ["Foreground", "Pretty Name 1"]'
|
| - ',"my_test_suite/my_other_test_*": '
|
| +_SAMPLE_TESTS = ['my_test_suite/my_test_avg', 'my_test_suite/my_other_test_avg']
|
| +_SAMPLE_LAYOUT = ('{ "my_test_suite/my_test_avg": ["Foreground", '
|
| + '"Pretty Name 1"],"my_test_suite/my_other_test_avg": '
|
| ' ["Foreground", "Pretty Name 2"]}')
|
|
|
| class SpeedReleasingTest(testing_common.TestCase):
|
| @@ -54,6 +54,7 @@ class SpeedReleasingTest(testing_common.TestCase):
|
|
|
| def _AddTableConfigDataStore(self, name, is_internal):
|
| """Add sample internal only tableConfig."""
|
| + keys = self._AddTests()
|
| if is_internal:
|
| self._AddInternalBotsToDataStore()
|
| else:
|
| @@ -63,37 +64,20 @@ class SpeedReleasingTest(testing_common.TestCase):
|
| tests=_SAMPLE_TESTS,
|
| layout=_SAMPLE_LAYOUT,
|
| username='internal@chromium.org')
|
| + return keys
|
|
|
| def _AddTests(self):
|
| testing_common.AddTests(['ChromiumPerf'], ['win', 'linux'], {
|
| 'my_test_suite': {
|
| - 'my_test_count': {},
|
| 'my_test_avg': {},
|
| - 'my_test_std': {},
|
| - 'my_test_max': {},
|
| - 'my_other_test_count': {},
|
| 'my_other_test_avg': {},
|
| - 'my_other_test_std': {},
|
| - 'my_other_test_max': {},
|
| }
|
| })
|
| keys = [
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_test_max'),
|
| utils.TestKey('ChromiumPerf/win/my_test_suite/my_test_avg'),
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_test_count'),
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_test_std'),
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_other_test_std'),
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_other_test_max'),
|
| utils.TestKey('ChromiumPerf/win/my_test_suite/my_other_test_avg'),
|
| - utils.TestKey('ChromiumPerf/win/my_test_suite/my_other_test_count'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_test_max'),
|
| utils.TestKey('ChromiumPerf/linux/my_test_suite/my_test_avg'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_test_std'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_test_count'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_other_test_max'),
|
| utils.TestKey('ChromiumPerf/linux/my_test_suite/my_other_test_avg'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_other_test_std'),
|
| - utils.TestKey('ChromiumPerf/linux/my_test_suite/my_other_test_count'),
|
| ]
|
| for test_key in keys:
|
| test = test_key.get()
|
| @@ -119,60 +103,29 @@ class SpeedReleasingTest(testing_common.TestCase):
|
| '"ThirdBestTable"]', response)
|
|
|
| def testPost_ShowInternalTable(self):
|
| - self._AddTableConfigDataStore('BestTable', True)
|
| - keys = self._AddTests()
|
| + keys = self._AddTableConfigDataStore('BestTable', True)
|
| self._AddRows(keys)
|
| response = self.testapp.post('/speed_releasing/BestTable?revA=1&revB=2')
|
| self.assertIn('"name": "BestTable"', response)
|
| self.assertIn('"table_bots": ["ChromiumPerf/win", '
|
| '"ChromiumPerf/linux"]', response)
|
| - self.assertIn('"table_tests": ["my_test_suite/my_test_*",'
|
| - ' "my_test_suite/my_other_test_*"]', response)
|
| + self.assertIn('"table_tests": ["my_test_suite/my_test_avg",'
|
| + ' "my_test_suite/my_other_test_avg"]', response)
|
| self.assertIn('"table_layout"', response)
|
| self.assertIn('"revisions": [1, 2]', response)
|
| - self.assertIn('"units": {"my_test_suite/my_test_max": "timeDurationInMs", '
|
| - '"my_test_suite/my_other_test_count": "timeDurationInMs", '
|
| - '"my_test_suite/my_other_test_max": "timeDurationInMs", '
|
| - '"my_test_suite/my_test_avg": "timeDurationInMs", '
|
| - '"my_test_suite/my_other_test_std": "timeDurationInMs", '
|
| - '"my_test_suite/my_test_count": "timeDurationInMs", '
|
| - '"my_test_suite/my_other_test_avg": "timeDurationInMs", '
|
| - '"my_test_suite/my_test_std": "timeDurationInMs"',
|
| + self.assertIn('"units": {"my_test_suite/my_test_avg": "timeDurationInMs", '
|
| + '"my_test_suite/my_other_test_avg": "timeDurationInMs"',
|
| response)
|
| self.assertIn('"categories": {"Foreground": 2}', response)
|
| self.assertIn('"values": {"1": {"ChromiumPerf/linux": '
|
| - '{"my_test_suite/my_test_max": 1.0, '
|
| - '"my_test_suite/my_other_test_count": 1.0, '
|
| - '"my_test_suite/my_other_test_max": 1.0, '
|
| - '"my_test_suite/my_test_avg": 1.0, '
|
| - '"my_test_suite/my_other_test_std": 1.0, '
|
| - '"my_test_suite/my_test_count": 1.0, '
|
| - '"my_test_suite/my_other_test_avg": 1.0, '
|
| - '"my_test_suite/my_test_std": 1.0}, "ChromiumPerf/win": '
|
| - '{"my_test_suite/my_test_max": 1.0, '
|
| - '"my_test_suite/my_other_test_count": 1.0, '
|
| - '"my_test_suite/my_other_test_max": 1.0, '
|
| - '"my_test_suite/my_test_avg": 1.0, '
|
| - '"my_test_suite/my_other_test_std": 1.0, '
|
| - '"my_test_suite/my_test_count": 1.0, '
|
| - '"my_test_suite/my_other_test_avg": 1.0, '
|
| - '"my_test_suite/my_test_std": 1.0}}, "2": '
|
| - '{"ChromiumPerf/linux": {"my_test_suite/my_test_max": 2.0, '
|
| - '"my_test_suite/my_other_test_count": 2.0, '
|
| - '"my_test_suite/my_other_test_max": 2.0, '
|
| - '"my_test_suite/my_test_avg": 2.0, '
|
| - '"my_test_suite/my_other_test_std": 2.0, '
|
| - '"my_test_suite/my_test_count": 2.0, '
|
| - '"my_test_suite/my_other_test_avg": 2.0, '
|
| - '"my_test_suite/my_test_std": 2.0}, "ChromiumPerf/win": '
|
| - '{"my_test_suite/my_test_max": 2.0, '
|
| - '"my_test_suite/my_other_test_count": 2.0, '
|
| - '"my_test_suite/my_other_test_max": 2.0, '
|
| - '"my_test_suite/my_test_avg": 2.0, '
|
| - '"my_test_suite/my_other_test_std": 2.0, '
|
| - '"my_test_suite/my_test_count": 2.0, '
|
| - '"my_test_suite/my_other_test_avg": 2.0, '
|
| - '"my_test_suite/my_test_std": 2.0}}}', response)
|
| + '{"my_test_suite/my_test_avg": 1.0, '
|
| + '"my_test_suite/my_other_test_avg": 1.0}, '
|
| + '"ChromiumPerf/win": {"my_test_suite/my_test_avg": 1.0, '
|
| + '"my_test_suite/my_other_test_avg": 1.0}}, '
|
| + '"2": {"ChromiumPerf/linux": {"my_test_suite/my_test_avg": '
|
| + '2.0, "my_test_suite/my_other_test_avg": 2.0}, '
|
| + '"ChromiumPerf/win": {"my_test_suite/my_test_avg": 2.0, '
|
| + '"my_test_suite/my_other_test_avg": 2.0}}}', response)
|
|
|
| def testPost_InternalListPageToExternalUser(self):
|
| self._AddTableConfigDataStore('BestTable', True)
|
|
|