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

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: Fix failing fetch_benchmark_deps unittest + rebase. 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 | « tools/perf/core/path_util.py ('k') | tools/perf/fetch_benchmark_deps_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c00e1ed3915966b2245ea350cf47d42a10d12c9f 100755
--- a/tools/perf/fetch_benchmark_deps.py
+++ b/tools/perf/fetch_benchmark_deps.py
@@ -8,20 +8,15 @@
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'telemetry'))
+from core import path_util
+path_util.AddCatapultBaseToPath()
from catapult_base import cloud_storage
-from telemetry import benchmark_runner
-
-
-def _GetPerfDir(*subdirs):
- perf_dir = os.path.realpath(os.path.dirname(__file__))
- return os.path.join(perf_dir, *subdirs)
+path_util.AddTelemetryToPath()
+from telemetry import benchmark_runner
-def GetChromiumDir():
- return _GetPerfDir(os.path.pardir, os.path.pardir, os.path.pardir)
-
+from chrome_telemetry_build import chromium_config
def _FetchDependenciesIfNeeded(story_set):
""" Download files needed by a user story set. """
@@ -57,7 +52,7 @@ def _EnumerateDependencies(story_set):
deps.add(path_name)
# Return relative paths.
- prefix_len = len(os.path.realpath(GetChromiumDir())) + 1
+ prefix_len = len(os.path.realpath(path_util.GetChromiumSrcDir())) + 1
return [dep[prefix_len:] for dep in deps if dep]
@@ -67,9 +62,9 @@ def _show_usage():
def main(output=sys.stdout):
- config = benchmark_runner.ProjectConfig(
- top_level_dir=_GetPerfDir(),
- benchmark_dirs=[_GetPerfDir('benchmarks')])
+ config = chromium_config.ChromiumConfig(
+ top_level_dir=path_util.GetPerfDir(),
+ benchmark_dirs=[os.path.join(path_util.GetPerfDir(), 'benchmarks')])
name = sys.argv[1]
benchmark = benchmark_runner.GetBenchmarkByName(name, config)
« no previous file with comments | « tools/perf/core/path_util.py ('k') | tools/perf/fetch_benchmark_deps_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698