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

Side by Side Diff: tools/telemetry/catapult_base/dependency_manager/dependency_manager.py

Issue 1361523003: Add crash_service to Telemetry's isolates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fck
Patch Set: Fix gyp all targets build failure. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/BUILD.gn ('k') | tools/telemetry/telemetry/internal/binary_dependencies.json » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import logging 5 import logging
6 import os 6 import os
7 import stat 7 import stat
8 8
9 from catapult_base import cloud_storage 9 from catapult_base import cloud_storage
10 from catapult_base import support_binaries 10 from catapult_base import support_binaries
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 Args: 210 Args:
211 dependency_info: A DependencyInfo instance for the dependency to be 211 dependency_info: A DependencyInfo instance for the dependency to be
212 found and the platform it should run on. 212 found and the platform it should run on.
213 213
214 Returns: A path to a local file, or None if not found. 214 Returns: A path to a local file, or None if not found.
215 """ 215 """
216 if dependency_info: 216 if dependency_info:
217 paths = dependency_info.local_paths 217 paths = dependency_info.local_paths
218 for local_path in paths: 218 for local_path in paths:
219 logging.info('Trying local_path %s', local_path)
219 if os.path.exists(local_path): 220 if os.path.exists(local_path):
221 logging.info('local_path %s exists.', local_path)
Dirk Pranke 2015/09/30 18:24:00 Do you really want to commit these logging lines?
aiolos (Not reviewing) 2015/09/30 18:32:16 Done.
220 return local_path 222 return local_path
221 return None 223 return None
222 224
223 @staticmethod 225 @staticmethod
224 def _CloudStoragePath(dependency_info): 226 def _CloudStoragePath(dependency_info):
225 """Return a path to a downloaded file for |dependency_info|. 227 """Return a path to a downloaded file for |dependency_info|.
226 228
227 May not download the file if it has already been downloaded. 229 May not download the file if it has already been downloaded.
228 230
229 Args: 231 Args:
(...skipping 28 matching lines...) Expand all
258 if not os.path.exists(download_dir): 260 if not os.path.exists(download_dir):
259 os.makedirs(download_dir) 261 os.makedirs(download_dir)
260 262
261 cloud_storage.GetIfHashChanged(cs_path, download_path, cs_bucket, cs_hash) 263 cloud_storage.GetIfHashChanged(cs_path, download_path, cs_bucket, cs_hash)
262 if not os.path.exists(download_path): 264 if not os.path.exists(download_path):
263 raise exceptions.FileNotFoundError(download_path) 265 raise exceptions.FileNotFoundError(download_path)
264 #TODO(aiolos): Add support for unzipping files. 266 #TODO(aiolos): Add support for unzipping files.
265 os.chmod(download_path, 267 os.chmod(download_path,
266 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP) 268 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP)
267 return os.path.abspath(download_path) 269 return os.path.abspath(download_path)
268
OLDNEW
« no previous file with comments | « tools/telemetry/BUILD.gn ('k') | tools/telemetry/telemetry/internal/binary_dependencies.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698