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

Side by Side Diff: tools/perf/profile_creators/update_remote_extensions.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: 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 unified diff | Download patch
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 base64 5 import base64
6 import csv 6 import csv
7 import json 7 import json
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
11 import sys 11 import sys
12 import tempfile 12 import tempfile
13 import urllib2 13 import urllib2
14 import zipfile 14 import zipfile
15 15
16 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 16 chromium_src_path = os.path.realpath(os.path.join(
17 'telemetry')) 17 os.path.abspath(__file__), '..', '..', '..', '..'))
18
19 telemetry_path = os.path.join(chromium_src_path, 'tools', 'telemetry')
20 if telemetry_path not in sys.path:
21 sys.path.insert(1, telemetry_path)
22
23 catapult_base_path = os.path.join(
24 chromium_src_path, 'third_party', 'catapult', 'catapult_base')
25 if catapult_base_path not in sys.path:
26 sys.path.insert(1, catapult_base_path)
18 27
19 from catapult_base import cloud_storage 28 from catapult_base import cloud_storage
20 from telemetry.core import exceptions 29 from telemetry.core import exceptions
21 30
22 # Remote target upload directory in cloud storage for extensions. 31 # Remote target upload directory in cloud storage for extensions.
23 REMOTE_DIR = 'extension_set' 32 REMOTE_DIR = 'extension_set'
24 33
25 # Target zip file. 34 # Target zip file.
26 ZIP_NAME = 'extensions.zip' 35 ZIP_NAME = 'extensions.zip'
27 36
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 local_extensions_dir = tempfile.mkdtemp() 207 local_extensions_dir = tempfile.mkdtemp()
199 try: 208 try:
200 _UpdateExtensionsInCloud(local_extensions_dir, 209 _UpdateExtensionsInCloud(local_extensions_dir,
201 extension_csv, REMOTE_DIR) 210 extension_csv, REMOTE_DIR)
202 finally: 211 finally:
203 shutil.rmtree(local_extensions_dir) 212 shutil.rmtree(local_extensions_dir)
204 213
205 if __name__ == '__main__': 214 if __name__ == '__main__':
206 main() 215 main()
207 216
OLDNEW
« tools/perf/profile_creators/__init__.py ('K') | « tools/perf/profile_creators/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698