| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Run all system health stories used by system health benchmarks. | 5 """Run all system health stories used by system health benchmarks. |
| 6 | 6 |
| 7 Only memory benchmarks are used when running these stories to make the total | 7 Only memory benchmarks are used when running these stories to make the total |
| 8 cycle time manageable. Other system health benchmarks should be using the same | 8 cycle time manageable. Other system health benchmarks should be using the same |
| 9 stories as memory ones, only with fewer actions (no memory dumping). | 9 stories as memory ones, only with fewer actions (no memory dumping). |
| 10 """ | 10 """ |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() | 146 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() |
| 147 assert benchmark_classes, 'This list should never be empty' | 147 assert benchmark_classes, 'This list should never be empty' |
| 148 for benchmark_class in benchmark_classes: | 148 for benchmark_class in benchmark_classes: |
| 149 | 149 |
| 150 # HACK: these options should be derived from options_for_unittests which are | 150 # HACK: these options should be derived from options_for_unittests which are |
| 151 # the resolved options from run_tests' arguments. However, options is only | 151 # the resolved options from run_tests' arguments. However, options is only |
| 152 # parsed during test time which happens after load_tests are called. | 152 # parsed during test time which happens after load_tests are called. |
| 153 # Since none of our system health benchmarks creates stories based on | 153 # Since none of our system health benchmarks creates stories based on |
| 154 # command line options, it should be ok to pass options=None to | 154 # command line options, it should be ok to pass options=None to |
| 155 # CreateStorySet. | 155 # CreateStorySet. |
| 156 for story_to_smoke_test in ( | 156 stories_set = benchmark_class().CreateStorySet(options=None) |
| 157 benchmark_class().CreateStorySet(options=None).stories): | 157 |
| 158 # Prefetch WPR archive needed by the stories set to avoid race condition |
| 159 # when feching them when tests are run in parallel. |
| 160 # See crbug.com/700426 for more details. |
| 161 stories_set.wpr_archive_info.DownloadArchivesIfNeeded() |
| 162 |
| 163 for story_to_smoke_test in stories_set.stories: |
| 158 suite.addTest( | 164 suite.addTest( |
| 159 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) | 165 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) |
| 160 | 166 |
| 161 return suite | 167 return suite |
| OLD | NEW |