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

Unified Diff: tools/perf/fetch_benchmark_deps.py

Issue 1568103002: Update tools/perf to use cloud_storage from catapult. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: tools/perf/fetch_benchmark_deps.py
diff --git a/tools/perf/fetch_benchmark_deps.py b/tools/perf/fetch_benchmark_deps.py
index ac6bd815abbe871c15b09bfd8f53dc81c2b8dea0..2f6fbcb3a7505ebd9477d8099d4f6a3920a1e09a 100755
--- a/tools/perf/fetch_benchmark_deps.py
+++ b/tools/perf/fetch_benchmark_deps.py
@@ -8,19 +8,26 @@
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'telemetry'))
-
-from catapult_base import cloud_storage
-from telemetry import benchmark_runner
-
def _GetPerfDir(*subdirs):
- perf_dir = os.path.realpath(os.path.dirname(__file__))
+ perf_dir = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
return os.path.join(perf_dir, *subdirs)
def GetChromiumDir():
- return _GetPerfDir(os.path.pardir, os.path.pardir, os.path.pardir)
+ return os.path.abspath(_GetPerfDir('..', '..', '..'))
+
+
+telemetry_path = os.path.os.path.join(GetChromiumDir(), 'tools', 'telemetry')
+if telemetry_path not in sys.path:
+ sys.path.insert(1, telemetry_path)
+catapult_base_path = os.path.join(
+ GetChromiumDir(), 'third_party', 'catapult', 'catapult_base')
+if catapult_base_path not in sys.path:
+ sys.path.insert(1, catapult_base_path)
+
+from catapult_base import cloud_storage
+from telemetry import benchmark_runner
def _FetchDependenciesIfNeeded(story_set):

Powered by Google App Engine
This is Rietveld 408576698