| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 options.MergeDefaultValues(parser.get_default_values()) | 102 options.MergeDefaultValues(parser.get_default_values()) |
| 103 | 103 |
| 104 benchmark_class.ProcessCommandLineArgs(None, options) | 104 benchmark_class.ProcessCommandLineArgs(None, options) |
| 105 benchmark_module.ProcessCommandLineArgs(None, options) | 105 benchmark_module.ProcessCommandLineArgs(None, options) |
| 106 # Only measure a single story so that this test cycles reasonably quickly. | 106 # Only measure a single story so that this test cycles reasonably quickly. |
| 107 options.pageset_repeat = 1 | 107 options.pageset_repeat = 1 |
| 108 options.page_repeat = 1 | 108 options.page_repeat = 1 |
| 109 # Enable browser logging in the smoke test only. Hopefully, this will detect | 109 # Enable browser logging in the smoke test only. Hopefully, this will detect |
| 110 # all crashes and hence remove the need to enable logging in actual perf | 110 # all crashes and hence remove the need to enable logging in actual perf |
| 111 # benchmarks. | 111 # benchmarks. |
| 112 options.logging_verbosity = 'non-verbose' | 112 options.browser_options.logging_verbosity = 'non-verbose' |
| 113 return options | 113 return options |
| 114 | 114 |
| 115 | 115 |
| 116 def load_tests(loader, standard_tests, pattern): | 116 def load_tests(loader, standard_tests, pattern): |
| 117 del loader, standard_tests, pattern # unused | 117 del loader, standard_tests, pattern # unused |
| 118 suite = progress_reporter.TestSuite() | 118 suite = progress_reporter.TestSuite() |
| 119 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() | 119 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() |
| 120 assert benchmark_classes, 'This list should never be empty' | 120 assert benchmark_classes, 'This list should never be empty' |
| 121 for benchmark_class in benchmark_classes: | 121 for benchmark_class in benchmark_classes: |
| 122 | 122 |
| 123 # HACK: these options should be derived from options_for_unittests which are | 123 # HACK: these options should be derived from options_for_unittests which are |
| 124 # the resolved options from run_tests' arguments. However, options is only | 124 # the resolved options from run_tests' arguments. However, options is only |
| 125 # parsed during test time which happens after load_tests are called. | 125 # parsed during test time which happens after load_tests are called. |
| 126 # Since none of our system health benchmarks creates stories based on | 126 # Since none of our system health benchmarks creates stories based on |
| 127 # command line options, it should be ok to pass options=None to | 127 # command line options, it should be ok to pass options=None to |
| 128 # CreateStorySet. | 128 # CreateStorySet. |
| 129 for story_to_smoke_test in ( | 129 for story_to_smoke_test in ( |
| 130 benchmark_class().CreateStorySet(options=None).stories): | 130 benchmark_class().CreateStorySet(options=None).stories): |
| 131 suite.addTest( | 131 suite.addTest( |
| 132 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) | 132 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) |
| 133 | 133 |
| 134 return suite | 134 return suite |
| OLD | NEW |