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/measurements/measurement_smoke_test.py

Issue 2958093002: [Perf] Update references to telemetry.core.discover (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « tools/perf/core/perf_data_generator.py ('k') | tools/perf/page_sets/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import logging 5 import logging
6 import optparse 6 import optparse
7 import os 7 import os
8 import unittest 8 import unittest
9 9
10 from telemetry import benchmark as benchmark_module 10 from telemetry import benchmark as benchmark_module
11 from telemetry.core import discover
12 from telemetry.internal.browser import browser_options 11 from telemetry.internal.browser import browser_options
13 from telemetry.page import legacy_page_test 12 from telemetry.page import legacy_page_test
14 from telemetry.testing import options_for_unittests 13 from telemetry.testing import options_for_unittests
15 from telemetry.web_perf import timeline_based_measurement 14 from telemetry.web_perf import timeline_based_measurement
16 15
16 from py_utils import discover
17
17 18
18 def _GetAllPossiblePageTestInstances(): 19 def _GetAllPossiblePageTestInstances():
19 page_test_instances = [] 20 page_test_instances = []
20 measurements_dir = os.path.dirname(__file__) 21 measurements_dir = os.path.dirname(__file__)
21 top_level_dir = os.path.dirname(measurements_dir) 22 top_level_dir = os.path.dirname(measurements_dir)
22 benchmarks_dir = os.path.join(top_level_dir, 'benchmarks') 23 benchmarks_dir = os.path.join(top_level_dir, 'benchmarks')
23 24
24 # Get all page test instances from measurement classes that are directly 25 # Get all page test instances from measurement classes that are directly
25 # constructible 26 # constructible
26 all_measurement_classes = discover.DiscoverClasses( 27 all_measurement_classes = discover.DiscoverClasses(
(...skipping 27 matching lines...) Expand all
54 page_test_instances.append(pt) 55 page_test_instances.append(pt)
55 56
56 return page_test_instances 57 return page_test_instances
57 58
58 59
59 class MeasurementSmokeTest(unittest.TestCase): 60 class MeasurementSmokeTest(unittest.TestCase):
60 # Simple smoke test to make sure that all page_test are constructible. 61 # Simple smoke test to make sure that all page_test are constructible.
61 62
62 def testAllMeasurementInstance(self): 63 def testAllMeasurementInstance(self):
63 _GetAllPossiblePageTestInstances() 64 _GetAllPossiblePageTestInstances()
OLDNEW
« no previous file with comments | « tools/perf/core/perf_data_generator.py ('k') | tools/perf/page_sets/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698