| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 the first page of every benchmark that has a composable measurement. | 5 """Run the first page of every benchmark that has a composable measurement. |
| 6 | 6 |
| 7 Ideally this test would be comprehensive, but the above serves as a | 7 Ideally this test would be comprehensive, but the above serves as a |
| 8 kind of smoke test. | 8 kind of smoke test. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 class SinglePageBenchmark(benchmark): # pylint: disable=W0232 | 33 class SinglePageBenchmark(benchmark): # pylint: disable=W0232 |
| 34 def CreatePageSet(self, options): | 34 def CreatePageSet(self, options): |
| 35 # pylint: disable=E1002 | 35 # pylint: disable=E1002 |
| 36 ps = super(SinglePageBenchmark, self).CreatePageSet(options) | 36 ps = super(SinglePageBenchmark, self).CreatePageSet(options) |
| 37 ps.pages = ps.pages[:1] | 37 ps.pages = ps.pages[:1] |
| 38 return ps | 38 return ps |
| 39 | 39 |
| 40 # Set the benchmark's default arguments. | 40 # Set the benchmark's default arguments. |
| 41 options = options_for_unittests.GetCopy() | 41 options = options_for_unittests.GetCopy() |
| 42 options.output_format = 'none' | 42 options.output_format = 'none' |
| 43 options.suppress_gtest_report = True |
| 43 parser = options.CreateParser() | 44 parser = options.CreateParser() |
| 44 | 45 |
| 45 benchmark.AddCommandLineArgs(parser) | 46 benchmark.AddCommandLineArgs(parser) |
| 46 benchmark_module.AddCommandLineArgs(parser) | 47 benchmark_module.AddCommandLineArgs(parser) |
| 47 benchmark.SetArgumentDefaults(parser) | 48 benchmark.SetArgumentDefaults(parser) |
| 48 options.MergeDefaultValues(parser.get_default_values()) | 49 options.MergeDefaultValues(parser.get_default_values()) |
| 49 | 50 |
| 50 benchmark.ProcessCommandLineArgs(None, options) | 51 benchmark.ProcessCommandLineArgs(None, options) |
| 51 benchmark_module.ProcessCommandLineArgs(None, options) | 52 benchmark_module.ProcessCommandLineArgs(None, options) |
| 52 | 53 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 83 if hasattr(benchmark, 'generated_profile_archive'): | 84 if hasattr(benchmark, 'generated_profile_archive'): |
| 84 # We'd like to test these, but don't know how yet. | 85 # We'd like to test these, but don't know how yet. |
| 85 continue | 86 continue |
| 86 | 87 |
| 87 class BenchmarkSmokeTest(unittest.TestCase): | 88 class BenchmarkSmokeTest(unittest.TestCase): |
| 88 pass | 89 pass |
| 89 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) | 90 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) |
| 90 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 91 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
| 91 | 92 |
| 92 return suite | 93 return suite |
| OLD | NEW |