Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: tools/perf/benchmarks/benchmark_unittest.py

Issue 440243002: Unittest for page_runner, etc. should suppress output from gtest_progress_reporter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_measurement_unittest_base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_measurement_unittest_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698