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

Unified Diff: tools/telemetry/telemetry/test_runner.py

Issue 337603005: Rename telemetry.test.Test to telemetry.benchmark.Benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
Index: tools/telemetry/telemetry/test_runner.py
diff --git a/tools/telemetry/telemetry/test_runner.py b/tools/telemetry/telemetry/test_runner.py
index f2c6643847ac02c897494ee11bab8ed3202bd2d6..e498a035d45a1c1982af172d6bff1c286daae89c 100644
--- a/tools/telemetry/telemetry/test_runner.py
+++ b/tools/telemetry/telemetry/test_runner.py
@@ -13,7 +13,7 @@ import os
import sys
from telemetry import decorators
-from telemetry import test
+from telemetry import benchmark
from telemetry.core import browser_options
from telemetry.core import command_line
from telemetry.core import discover
@@ -105,7 +105,7 @@ class Run(command_line.OptparseCommand):
@classmethod
def AddCommandLineArgs(cls, parser):
- test.AddCommandLineArgs(parser)
+ benchmark.AddCommandLineArgs(parser)
# Allow tests to add their own command line options.
matching_tests = []
@@ -154,7 +154,7 @@ class Run(command_line.OptparseCommand):
discover.IsPageSetFile(page_set_path)):
parser.error('Unsupported page set file format.')
- class TestWrapper(test.Test):
+ class TestWrapper(benchmark.Benchmark):
test = test_class
@classmethod
@@ -166,9 +166,10 @@ class Run(command_line.OptparseCommand):
if len(args.positional_args) > 1:
parser.error('Too many arguments.')
- assert issubclass(test_class, test.Test), 'Trying to run a non-Test?!'
+ assert issubclass(test_class, benchmark.Benchmark), (
+ 'Trying to run a non-Benchmark?!')
- test.ProcessCommandLineArgs(parser, args)
+ benchmark.ProcessCommandLineArgs(parser, args)
test_class.ProcessCommandLineArgs(parser, args)
cls._test = test_class
@@ -198,7 +199,7 @@ def _MatchingCommands(string):
def _Tests():
tests = []
for base_dir in config.base_paths:
- tests += discover.DiscoverClasses(base_dir, base_dir, test.Test,
+ tests += discover.DiscoverClasses(base_dir, base_dir, benchmark.Benchmark,
index_by_class_name=True).values()
page_tests = discover.DiscoverClasses(base_dir, base_dir,
page_test.PageTest,
@@ -243,7 +244,7 @@ def _PrintTestList(tests):
format_string = ' %%-%ds %%s' % max(len(t.Name()) for t in tests)
filtered_tests = [test_class for test_class in tests
- if issubclass(test_class, test.Test)]
+ if issubclass(test_class, benchmark.Benchmark)]
if filtered_tests:
print >> sys.stderr, 'Available tests are:'
for test_class in sorted(filtered_tests, key=lambda t: t.Name()):

Powered by Google App Engine
This is Rietveld 408576698