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

Unified Diff: tools/perf/measurements/measurement_smoke_test.py

Issue 789363002: TimelineBasedMeasurement(object) instead of TimelineBasedMeasurement(page_test.PageTest) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 11 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 | « tools/perf/benchmarks/v8.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/measurement_smoke_test.py
diff --git a/tools/perf/measurements/measurement_smoke_test.py b/tools/perf/measurements/measurement_smoke_test.py
index d4b4a3d2dcd562de359ddf0ca38a21e3fe0f544d..3cd6a1aa546bd3792c18bf7b79b3527e75767422 100644
--- a/tools/perf/measurements/measurement_smoke_test.py
+++ b/tools/perf/measurements/measurement_smoke_test.py
@@ -13,6 +13,7 @@ from telemetry.core import discover
from telemetry.page import page_test
from telemetry.unittest_util import options_for_unittests
from telemetry.util import classes
+from telemetry.web_perf import timeline_based_measurement
# Do NOT add new items to this list!
@@ -44,7 +45,6 @@ def _GetAllPossiblePageTestInstances():
# Note: since this depends on the command line options, there is no guaranteed
# that this will generate all possible page test instances but it's worth
# enough for smoke test purpose.
-
for benchmark_class in all_benchmarks_classes:
options = options_for_unittests.GetCopy()
parser = options.CreateParser()
@@ -52,7 +52,9 @@ def _GetAllPossiblePageTestInstances():
benchmark_module.AddCommandLineArgs(parser)
benchmark_class.SetArgumentDefaults(parser)
options.MergeDefaultValues(parser.get_default_values())
- page_test_instances.append(benchmark_class().CreatePageTest(options))
+ pt = benchmark_class().CreatePageTest(options)
+ if not isinstance(pt, timeline_based_measurement.TimelineBasedMeasurement):
+ page_test_instances.append(pt)
return page_test_instances
@@ -62,6 +64,10 @@ class MeasurementSmokeTest(unittest.TestCase):
def testNoNewActionNameToRunUsed(self):
invalid_tests = []
for test in _GetAllPossiblePageTestInstances():
+ if not hasattr(test, 'action_name_to_run'):
+ invalid_tests.append(test)
+ logging.error('Test %s missing action_name_to_run attribute.',
+ test.__class__.__name__)
if test.action_name_to_run not in _ACTION_NAMES_WHITE_LIST:
invalid_tests.append(test)
logging.error('Page test %s has invalid action_name_to_run: %s' %
« no previous file with comments | « tools/perf/benchmarks/v8.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698