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

Unified Diff: tools/perf/benchmarks/benchmark_smoke_unittest.py

Issue 653233002: Add BenchmarkOptionsTest. Move smoke test to benchmark_smoke_unittest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Have |_GetPerfDir| use __file__ instead of GetChromiumSrcDir 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/benchmarks/benchmark_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/benchmark_smoke_unittest.py
diff --git a/tools/perf/benchmarks/benchmark_unittest.py b/tools/perf/benchmarks/benchmark_smoke_unittest.py
similarity index 86%
copy from tools/perf/benchmarks/benchmark_unittest.py
copy to tools/perf/benchmarks/benchmark_smoke_unittest.py
index 476804ed536fc00f2d39ba93634411665ec7bc23..fa3532801071a42c5e6a3bc3456a2ca6dd529b7c 100644
--- a/tools/perf/benchmarks/benchmark_unittest.py
+++ b/tools/perf/benchmarks/benchmark_smoke_unittest.py
@@ -2,10 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Run the first page of every benchmark that has a composable measurement.
+"""Run the first page of one benchmark for every module.
-Ideally this test would be comprehensive, but the above serves as a
-kind of smoke test.
+Only benchmarks that have a composable measurement are included.
+Ideally this test would be comprehensive, however, running one page
+of every benchmark would run impractically long.
"""
import os
@@ -69,11 +70,12 @@ def load_tests(_, _2, _3):
measurements_dir = os.path.join(top_level_dir, 'measurements')
all_measurements = discover.DiscoverClasses(
- measurements_dir, top_level_dir, page_test.PageTest,
- pattern='*.py').values()
+ measurements_dir, top_level_dir, page_test.PageTest).values()
+ # Using the default of |index_by_class_name=False| means that if a module
+ # has multiple benchmarks, only the last one is returned.
all_benchmarks = discover.DiscoverClasses(
benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
- pattern='*.py').values()
+ index_by_class_name=False).values()
for benchmark in all_benchmarks:
if benchmark.PageTestClass() not in all_measurements:
# If the benchmark is not in measurements, then it is not composable.
« no previous file with comments | « no previous file | tools/perf/benchmarks/benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698