summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsbasi@google.com <sbasi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 15:38:37 +0000
committersbasi@google.com <sbasi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-04 15:38:37 +0000
commita273f192f57fd422ccbba86ee52772408a8ee423 (patch)
treead7901e115dec47f5e475d32ddd4939434c08f12 /tools
parentd6cfcad8e7e39d76254092bd827d8c327e1804a0 (diff)
downloadchromium_src-a273f192f57fd422ccbba86ee52772408a8ee423.zip
chromium_src-a273f192f57fd422ccbba86ee52772408a8ee423.tar.gz
chromium_src-a273f192f57fd422ccbba86ee52772408a8ee423.tar.bz2
Telemetry: Make ListAllDepsPaths pull DEPS locally
Currently ListAllDepsPaths goes to the internet to pull down the DEPS required to run telemetry. This will give the caller the DEPS currently on ToT and the use case is so that it pulls the DEPS from the files around it in its checkout. Change is to rework deps_include to be a dict, and to open the local DEPS files rather then grab them from the web. BUG=chromium:173652 TEST=Ran ListAllDepsPath in python interpreter. NOTRY=True Review URL: https://chromiumcodereview.appspot.com/12082118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/perf_lib/bootstrap_deps7
-rw-r--r--tools/telemetry/tools/telemetry_bootstrap.py11
2 files changed, 11 insertions, 7 deletions
diff --git a/tools/perf/perf_lib/bootstrap_deps b/tools/perf/perf_lib/bootstrap_deps
index f5cdb95..3e435ab 100644
--- a/tools/perf/perf_lib/bootstrap_deps
+++ b/tools/perf/perf_lib/bootstrap_deps
@@ -15,6 +15,7 @@ deps = {
}
# perf_tools depends on Telemetry, so pull in the Telemetry deps, too.
-deps_includes = [
- "https://src.chromium.org/chrome/trunk/src/tools/telemetry/tools/bootstrap_deps"
- ]
+deps_includes = {
+ "src/tools/telemetry/tools/bootstrap_deps":
+ "https://src.chromium.org/chrome/trunk/src/tools/telemetry/tools/bootstrap_deps",
+ }
diff --git a/tools/telemetry/tools/telemetry_bootstrap.py b/tools/telemetry/tools/telemetry_bootstrap.py
index 989958b..43e232f 100644
--- a/tools/telemetry/tools/telemetry_bootstrap.py
+++ b/tools/telemetry/tools/telemetry_bootstrap.py
@@ -89,7 +89,7 @@ class DAVClientWrapper():
os.path.join(dst_path, subdir))
-def ListAllDepsPaths(deps_content):
+def ListAllDepsPaths(chrome_root, deps_content):
"""Recursively returns a list of all paths indicated in this deps file.
Note that this discards information about where path dependencies come from,
@@ -97,6 +97,7 @@ def ListAllDepsPaths(deps_content):
used gclient to already fetch all dependencies.
Args:
+ chrome_root: Path to the root directory of this chromium checkout.
deps_content: String containing deps information to be evaluated, in the
format given in the header of this file.
Returns: A list of string paths starting under src that are required by the
@@ -109,8 +110,10 @@ def ListAllDepsPaths(deps_content):
deps_paths = deps.deps.keys()
if hasattr(deps, 'deps_includes'):
- for url in deps.deps_includes:
- deps_paths = deps_paths + ListAllDepsPaths(urllib.urlopen(url).read())
+ for path in deps.deps_includes.keys():
+ # Need to localize the paths.
+ path = os.path.join(chrome_root, path)
+ deps_paths = deps_paths + ListAllDepsPaths(chrome_root, open(path).read())
return deps_paths
@@ -152,6 +155,6 @@ def DownloadDeps(destination_dir, deps_content):
dav_client.Traverse(parsed_url.path, full_dst_path)
if hasattr(deps, 'deps_includes'):
- for url in deps.deps_includes:
+ for url in deps.deps_includes.values():
DownloadDepsURL(destination_dir, url)