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

Unified Diff: tools/telemetry/telemetry/core/discover.py

Issue 274773002: [telemetry] Prototype for specifying page sets using Python imports and Telemetry discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/core/discover.py
diff --git a/tools/telemetry/telemetry/core/discover.py b/tools/telemetry/telemetry/core/discover.py
index c68dab81dbc9b29cb6274882da2e17afb9ae1001..53cc4683e5fb1a1abefb0550740a95f320bfb5a9 100644
--- a/tools/telemetry/telemetry/core/discover.py
+++ b/tools/telemetry/telemetry/core/discover.py
@@ -9,8 +9,6 @@ import re
from telemetry import decorators
from telemetry.core import camel_case
-from telemetry.core import util
-from telemetry.page import page_set
@decorators.Cache
@@ -117,31 +115,3 @@ def DiscoverClassesInModule(module, base_class, index_by_class_name=False):
classes[key_name] = obj
return classes
-
-
-_counter = [0]
-def _GetUniqueModuleName():
- _counter[0] += 1
- return "module_" + str(_counter[0])
-
-
-def IsPageSetFile(file_path):
- root_name, ext_name = os.path.splitext(file_path)
- if 'unittest' in root_name or 'page_sets/data' in root_name:
- return False
- if ext_name != '.py':
- return False
- module = util.GetPythonPageSetModule(file_path)
- return bool(DiscoverClassesInModule(module, page_set.PageSet))
-
-
-def GetAllPageSetFilenames(dir_path):
- results = []
- for sub_path, _, filenames in os.walk(dir_path):
- for f in filenames:
- if f.startswith('.'):
- continue
- filename = os.path.join(sub_path, f)
- if IsPageSetFile(filename):
- results.append(filename)
- return results
« no previous file with comments | « tools/telemetry/telemetry/core/backends/adb_commands.py ('k') | tools/telemetry/telemetry/core/discover_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698