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

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

Issue 637153002: telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 top_level_dir = os.path.dirname(benchmarks_dir) 68 top_level_dir = os.path.dirname(benchmarks_dir)
69 measurements_dir = os.path.join(top_level_dir, 'measurements') 69 measurements_dir = os.path.join(top_level_dir, 'measurements')
70 70
71 all_measurements = discover.DiscoverClasses( 71 all_measurements = discover.DiscoverClasses(
72 measurements_dir, top_level_dir, page_test.PageTest, 72 measurements_dir, top_level_dir, page_test.PageTest,
73 pattern='*.py').values() 73 pattern='*.py').values()
74 all_benchmarks = discover.DiscoverClasses( 74 all_benchmarks = discover.DiscoverClasses(
75 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, 75 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
76 pattern='*.py').values() 76 pattern='*.py').values()
77 for benchmark in all_benchmarks: 77 for benchmark in all_benchmarks:
78 if benchmark.PageTestClass() not in all_measurements: 78 if hasattr(benchmark, 'test') and benchmark.test not in all_measurements:
79 # If the benchmark is not in measurements, then it is not composable. 79 # If the benchmark is not in measurements, then it is not composable.
80 # Ideally we'd like to test these as well, but the non-composable 80 # Ideally we'd like to test these as well, but the non-composable
81 # benchmarks are usually long-running benchmarks. 81 # benchmarks are usually long-running benchmarks.
82 continue 82 continue
83 83
84 # TODO(tonyg): Smoke doesn't work with session_restore yet. 84 # TODO(tonyg): Smoke doesn't work with session_restore yet.
85 if benchmark.Name().startswith('session_restore'): 85 if benchmark.Name().startswith('session_restore'):
86 continue 86 continue
87 87
88 if hasattr(benchmark, 'generated_profile_archive'): 88 if hasattr(benchmark, 'generated_profile_archive'):
89 # We'd like to test these, but don't know how yet. 89 # We'd like to test these, but don't know how yet.
90 continue 90 continue
91 91
92 class BenchmarkSmokeTest(unittest.TestCase): 92 class BenchmarkSmokeTest(unittest.TestCase):
93 pass 93 pass
94 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) 94 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark))
95 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) 95 suite.addTest(BenchmarkSmokeTest(benchmark.Name()))
96 96
97 return suite 97 return suite
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/page_cycler.py » ('j') | tools/perf/benchmarks/rasterize_and_record_micro.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698