Chromium Code Reviews| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 benchmark_class.AddCommandLineArgs(parser) | 99 benchmark_class.AddCommandLineArgs(parser) |
| 100 benchmark_module.AddCommandLineArgs(parser) | 100 benchmark_module.AddCommandLineArgs(parser) |
| 101 benchmark_class.SetArgumentDefaults(parser) | 101 benchmark_class.SetArgumentDefaults(parser) |
| 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 (crbug.com/625172). | |
| 110 options.logging_verbosity = 'non-verbose' | |
|
nednguyen
2016/08/03 12:31:13
Why remove the log here? These are convenient for
petrcermak
2016/08/03 13:05:35
No need to do it here when SetExtraBrowserOptions
nednguyen
2016/08/03 13:13:26
I see.
| |
| 111 return options | 109 return options |
| 112 | 110 |
| 113 | 111 |
| 114 def load_tests(loader, standard_tests, pattern): | 112 def load_tests(loader, standard_tests, pattern): |
| 115 del loader, standard_tests, pattern # unused | 113 del loader, standard_tests, pattern # unused |
| 116 suite = progress_reporter.TestSuite() | 114 suite = progress_reporter.TestSuite() |
| 117 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() | 115 benchmark_classes = GetSystemHealthBenchmarksToSmokeTest() |
| 118 assert benchmark_classes, 'This list should never be empty' | 116 assert benchmark_classes, 'This list should never be empty' |
| 119 for benchmark_class in benchmark_classes: | 117 for benchmark_class in benchmark_classes: |
| 120 | 118 |
| 121 # HACK: these options should be derived from options_for_unittests which are | 119 # HACK: these options should be derived from options_for_unittests which are |
| 122 # the resolved options from run_tests' arguments. However, options is only | 120 # the resolved options from run_tests' arguments. However, options is only |
| 123 # parsed during test time which happens after load_tests are called. | 121 # parsed during test time which happens after load_tests are called. |
| 124 # Since none of our system health benchmarks creates stories based on | 122 # Since none of our system health benchmarks creates stories based on |
| 125 # command line options, it should be ok to pass options=None to | 123 # command line options, it should be ok to pass options=None to |
| 126 # CreateStorySet. | 124 # CreateStorySet. |
| 127 for story_to_smoke_test in ( | 125 for story_to_smoke_test in ( |
| 128 benchmark_class().CreateStorySet(options=None).stories): | 126 benchmark_class().CreateStorySet(options=None).stories): |
| 129 suite.addTest( | 127 suite.addTest( |
| 130 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) | 128 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) |
| 131 | 129 |
| 132 return suite | 130 return suite |
| OLD | NEW |