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

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

Issue 1263063003: Revert of Create classes_util API, change discover to return a list instead of a dict. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 one benchmark for every module. 5 """Run the first page of one benchmark for every module.
6 6
7 Only benchmarks that have a composable measurement are included. 7 Only benchmarks that have a composable measurement are included.
8 Ideally this test would be comprehensive, however, running one page 8 Ideally this test would be comprehensive, however, running one page
9 of every benchmark would run impractically long. 9 of every benchmark would run impractically long.
10 """ 10 """
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 97
98 def load_tests(loader, standard_tests, pattern): 98 def load_tests(loader, standard_tests, pattern):
99 del loader, standard_tests, pattern # unused 99 del loader, standard_tests, pattern # unused
100 suite = progress_reporter.TestSuite() 100 suite = progress_reporter.TestSuite()
101 101
102 benchmarks_dir = os.path.dirname(__file__) 102 benchmarks_dir = os.path.dirname(__file__)
103 top_level_dir = os.path.dirname(benchmarks_dir) 103 top_level_dir = os.path.dirname(benchmarks_dir)
104 104
105 # Using the default of |one_class_per_module=True| means that if a module 105 # Using the default of |index_by_class_name=False| means that if a module
106 # has multiple benchmarks, only the first one is returned. 106 # has multiple benchmarks, only the last one is returned.
107 all_benchmarks = discover.DiscoverClasses( 107 all_benchmarks = discover.DiscoverClasses(
108 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, 108 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
109 one_class_per_module=True) 109 index_by_class_name=False).values()
110 for benchmark in all_benchmarks: 110 for benchmark in all_benchmarks:
111 if sys.modules[benchmark.__module__] in _BLACK_LIST_TEST_MODULES: 111 if sys.modules[benchmark.__module__] in _BLACK_LIST_TEST_MODULES:
112 continue 112 continue
113 # TODO(tonyg): Smoke doesn't work with session_restore yet. 113 # TODO(tonyg): Smoke doesn't work with session_restore yet.
114 if (benchmark.Name().startswith('session_restore') or 114 if (benchmark.Name().startswith('session_restore') or
115 benchmark.Name().startswith('skpicture_printer')): 115 benchmark.Name().startswith('skpicture_printer')):
116 continue 116 continue
117 117
118 if hasattr(benchmark, 'generated_profile_archive'): 118 if hasattr(benchmark, 'generated_profile_archive'):
119 # We'd like to test these, but don't know how yet. 119 # We'd like to test these, but don't know how yet.
(...skipping 26 matching lines...) Expand all
146 146
147 # Disable some tests on android platform only. 147 # Disable some tests on android platform only.
148 if sys.modules[benchmark.__module__] in _ANDROID_BLACK_LIST_MODULES: 148 if sys.modules[benchmark.__module__] in _ANDROID_BLACK_LIST_MODULES:
149 method._disabled_strings.append('android') 149 method._disabled_strings.append('android')
150 150
151 setattr(BenchmarkSmokeTest, benchmark.Name(), method) 151 setattr(BenchmarkSmokeTest, benchmark.Name(), method)
152 152
153 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) 153 suite.addTest(BenchmarkSmokeTest(benchmark.Name()))
154 154
155 return suite 155 return suite
OLDNEW
« no previous file with comments | « tools/chrome_proxy/live_tests/pagesets/__init__.py ('k') | tools/perf/benchmarks/benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698