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

Unified Diff: tools/perf/chrome_telemetry_build/chromium_config.py

Issue 1579743002: [Telemetry] Update telemetry_unittests to use tools/perf/run_telemetry_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Marc's comments Created 4 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 | « testing/buildbot/gn_isolate_map.pyl ('k') | tools/perf/core/path_util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/chrome_telemetry_build/chromium_config.py
diff --git a/tools/perf/chrome_telemetry_build/chromium_config.py b/tools/perf/chrome_telemetry_build/chromium_config.py
index b5a162bedb32f14c7157a12540b30dcaa06bbc69..26ccfef03ec30d2f3ba92ec40f97b1b2dc8ffa62 100644
--- a/tools/perf/chrome_telemetry_build/chromium_config.py
+++ b/tools/perf/chrome_telemetry_build/chromium_config.py
@@ -6,24 +6,30 @@ import logging
import os
import sys
-CHROMIUM_SRC_DIR = os.path.join(
- os.path.dirname(__file__), os.path.pardir, os.path.pardir, os.path.pardir)
-sys.path.append(os.path.join(CHROMIUM_SRC_DIR, 'tools', 'telemetry'))
+def GetChromiumSrcDir():
+ return os.path.abspath(
+ os.path.join(os.path.abspath(__file__), '..', '..', '..', '..'))
-from telemetry import project_config
+
+def GetTelemetryDir():
+ return os.path.join(GetChromiumSrcDir(), 'tools', 'telemetry')
CLIENT_CONFIG_PATH = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json')
+sys.path.insert(1, os.path.join(GetTelemetryDir()))
+
+from telemetry import project_config
+
class ChromiumConfig(project_config.ProjectConfig):
def __init__(self, top_level_dir=None, benchmark_dirs=None,
client_config=CLIENT_CONFIG_PATH,
- default_chrome_root=CHROMIUM_SRC_DIR):
+ default_chrome_root=GetChromiumSrcDir()):
- perf_dir = os.path.join(CHROMIUM_SRC_DIR, 'tools', 'perf')
+ perf_dir = os.path.join(GetChromiumSrcDir(), 'tools', 'perf')
if not benchmark_dirs:
benchmark_dirs = [os.path.join(perf_dir, 'benchmarks')]
logging.info('No benchmark directories specified. Defaulting to %s',
« no previous file with comments | « testing/buildbot/gn_isolate_map.pyl ('k') | tools/perf/core/path_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698