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

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

Issue 1491373003: Use catapult gsutil instead of telemetry gsutilz. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dave nit Created 5 years 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/perf/benchmarks/smoothness.py ('k') | tools/telemetry/telemetry/core/util.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 """Wrappers for gsutil, for basic interaction with Google Cloud Storage.""" 5 """Wrappers for gsutil, for basic interaction with Google Cloud Storage."""
6 6
7 import collections 7 import collections
8 import contextlib 8 import contextlib
9 import hashlib 9 import hashlib
10 import logging 10 import logging
(...skipping 25 matching lines...) Expand all
36 BUCKET_ALIASES = collections.OrderedDict(( 36 BUCKET_ALIASES = collections.OrderedDict((
37 ('public', PUBLIC_BUCKET), 37 ('public', PUBLIC_BUCKET),
38 ('partner', PARTNER_BUCKET), 38 ('partner', PARTNER_BUCKET),
39 ('internal', INTERNAL_BUCKET), 39 ('internal', INTERNAL_BUCKET),
40 ('output', TELEMETRY_OUTPUT), 40 ('output', TELEMETRY_OUTPUT),
41 )) 41 ))
42 42
43 BUCKET_ALIAS_NAMES = BUCKET_ALIASES.keys() 43 BUCKET_ALIAS_NAMES = BUCKET_ALIASES.keys()
44 44
45 45
46 _GSUTIL_PATH = os.path.join(path.GetTelemetryDir(), 'third_party', 'gsutilz', 46 _GSUTIL_PATH = os.path.join(util.GetCatapultDir(), 'third_party', 'gsutil',
47 'gsutil') 47 'gsutil')
48 48
49 # TODO(tbarzic): A workaround for http://crbug.com/386416 and 49 # TODO(tbarzic): A workaround for http://crbug.com/386416 and
50 # http://crbug.com/359293. See |_RunCommand|. 50 # http://crbug.com/359293. See |_RunCommand|.
51 _CROS_GSUTIL_HOME_WAR = '/home/chromeos-test/' 51 _CROS_GSUTIL_HOME_WAR = '/home/chromeos-test/'
52 52
53 53
54 class CloudStorageError(Exception): 54 class CloudStorageError(Exception):
55 @staticmethod 55 @staticmethod
56 def _GetConfigInstructions(): 56 def _GetConfigInstructions():
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 chunk = f.read(1024*1024) 342 chunk = f.read(1024*1024)
343 if not chunk: 343 if not chunk:
344 break 344 break
345 sha1.update(chunk) 345 sha1.update(chunk)
346 return sha1.hexdigest() 346 return sha1.hexdigest()
347 347
348 348
349 def ReadHash(hash_path): 349 def ReadHash(hash_path):
350 with open(hash_path, 'rb') as f: 350 with open(hash_path, 'rb') as f:
351 return f.read(1024).rstrip() 351 return f.read(1024).rstrip()
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/smoothness.py ('k') | tools/telemetry/telemetry/core/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698