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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 pass | 105 pass |
106 | 106 |
107 setattr(SystemHealthBenchmarkSmokeTest, test_method_name, RunTest) | 107 setattr(SystemHealthBenchmarkSmokeTest, test_method_name, RunTest) |
108 | 108 |
109 return SystemHealthBenchmarkSmokeTest(methodName=test_method_name) | 109 return SystemHealthBenchmarkSmokeTest(methodName=test_method_name) |
110 | 110 |
111 | 111 |
112 def GenerateBenchmarkOptions(benchmark_class): | 112 def GenerateBenchmarkOptions(benchmark_class): |
113 # Set the benchmark's default arguments. | 113 # Set the benchmark's default arguments. |
114 options = options_for_unittests.GetCopy() | 114 options = options_for_unittests.GetCopy() |
115 options.output_format = 'none' | 115 options.output_formats = ['none'] |
116 parser = options.CreateParser() | 116 parser = options.CreateParser() |
117 | 117 |
118 # TODO(nednguyen): probably this logic of setting up the benchmark options | 118 # TODO(nednguyen): probably this logic of setting up the benchmark options |
119 # parser & processing the options should be sharable with telemetry's | 119 # parser & processing the options should be sharable with telemetry's |
120 # core. | 120 # core. |
121 benchmark_class.AddCommandLineArgs(parser) | 121 benchmark_class.AddCommandLineArgs(parser) |
122 benchmark_module.AddCommandLineArgs(parser) | 122 benchmark_module.AddCommandLineArgs(parser) |
123 benchmark_class.SetArgumentDefaults(parser) | 123 benchmark_class.SetArgumentDefaults(parser) |
124 options.MergeDefaultValues(parser.get_default_values()) | 124 options.MergeDefaultValues(parser.get_default_values()) |
125 | 125 |
(...skipping 21 matching lines...) Expand all Loading... |
147 # parsed during test time which happens after load_tests are called. | 147 # parsed during test time which happens after load_tests are called. |
148 # Since none of our system health benchmarks creates stories based on | 148 # Since none of our system health benchmarks creates stories based on |
149 # command line options, it should be ok to pass options=None to | 149 # command line options, it should be ok to pass options=None to |
150 # CreateStorySet. | 150 # CreateStorySet. |
151 for story_to_smoke_test in ( | 151 for story_to_smoke_test in ( |
152 benchmark_class().CreateStorySet(options=None).stories): | 152 benchmark_class().CreateStorySet(options=None).stories): |
153 suite.addTest( | 153 suite.addTest( |
154 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) | 154 _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test)) |
155 | 155 |
156 return suite | 156 return suite |
OLD | NEW |