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

Side by Side Diff: tools/perf/core/bootstrap.py

Issue 1467143006: [Telemetry] Migrate find_dependencies internals to tools/perf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ned's comment Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/core/find_dependencies.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Bootstrap Chrome Telemetry by downloading all its files from SVN servers. 5 """Bootstrap Chrome Telemetry by downloading all its files from SVN servers.
6 6
7 Requires a DEPS file to specify which directories on which SVN servers 7 Requires a DEPS file to specify which directories on which SVN servers
8 are required to run Telemetry. Format of that DEPS file is a subset of the 8 are required to run Telemetry. Format of that DEPS file is a subset of the
9 normal DEPS file format[1]; currently only only the "deps" dictionary is 9 normal DEPS file format[1]; currently only only the "deps" dictionary is
10 supported and nothing else. 10 supported and nothing else.
11 11
12 Fetches all files in the specified directories using WebDAV (SVN is WebDAV under 12 Fetches all files in the specified directories using WebDAV (SVN is WebDAV under
13 the hood). 13 the hood).
14 14
15 [1] http://dev.chromium.org/developers/how-tos/depottools#TOC-DEPS-file 15 [1] http://dev.chromium.org/developers/how-tos/depottools#TOC-DEPS-file
16 """ 16 """
17 17
18 import imp 18 import imp
19 import logging 19 import logging
20 import os 20 import os
21 import urllib 21 import urllib
22 import urlparse 22 import urlparse
23 23
24 # Dummy module for DAVclient. 24 # Dummy module for DAVclient.
25 davclient = None 25 davclient = None
26 26
27 27
28 # TODO(eakuefner): Switch this link to tools/perf version after verifying.
28 # Link to file containing the 'davclient' WebDAV client library. 29 # Link to file containing the 'davclient' WebDAV client library.
29 _DAVCLIENT_URL = ('https://src.chromium.org/chrome/trunk/src/tools/' 30 _DAVCLIENT_URL = ('https://src.chromium.org/chrome/trunk/src/tools/'
30 'telemetry/third_party/davclient/davclient.py') 31 'telemetry/third_party/davclient/davclient.py')
31 32
32 33
33 def _DownloadAndImportDAVClientModule(): 34 def _DownloadAndImportDAVClientModule():
34 """Dynamically import davclient helper library.""" 35 """Dynamically import davclient helper library."""
35 global davclient 36 global davclient
36 davclient_src = urllib.urlopen(_DAVCLIENT_URL).read() 37 davclient_src = urllib.urlopen(_DAVCLIENT_URL).read()
37 davclient = imp.new_module('davclient') 38 davclient = imp.new_module('davclient')
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 for dst_path, src_path in deps.iteritems(): 152 for dst_path, src_path in deps.iteritems():
152 full_dst_path = os.path.join(destination_dir, dst_path) 153 full_dst_path = os.path.join(destination_dir, dst_path)
153 parsed_url = urlparse.urlparse(src_path) 154 parsed_url = urlparse.urlparse(src_path)
154 root_url = parsed_url.scheme + '://' + parsed_url.netloc 155 root_url = parsed_url.scheme + '://' + parsed_url.netloc
155 156
156 dav_client = DAVClientWrapper(root_url) 157 dav_client = DAVClientWrapper(root_url)
157 dav_client.Traverse(parsed_url.path, full_dst_path) 158 dav_client.Traverse(parsed_url.path, full_dst_path)
158 159
159 for url in deps_includes.values(): 160 for url in deps_includes.values():
160 DownloadDeps(destination_dir, url) 161 DownloadDeps(destination_dir, url)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/core/find_dependencies.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698