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

Side by Side Diff: tools/perf/PRESUBMIT.py

Issue 1582793006: [Telemetry] Update all clients to use chromium_config.GetTelemetryDir() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more rebase 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
« no previous file with comments | « tools/cygprofile/profile_android_startup.py ('k') | tools/perf/generate_profile » ('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 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 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 """Presubmit script for changes affecting tools/perf/. 5 """Presubmit script for changes affecting tools/perf/.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 37
38 def _CheckWprShaFiles(input_api, output_api): 38 def _CheckWprShaFiles(input_api, output_api):
39 """Check whether the wpr sha files have matching URLs.""" 39 """Check whether the wpr sha files have matching URLs."""
40 old_sys_path = sys.path 40 old_sys_path = sys.path
41 try: 41 try:
42 perf_dir = input_api.PresubmitLocalPath() 42 perf_dir = input_api.PresubmitLocalPath()
43 catapult_path = os.path.abspath(os.path.join( 43 catapult_path = os.path.abspath(os.path.join(
44 perf_dir, '..', '..', 'third_party', 'catapult', 'catapult_base')) 44 perf_dir, '..', '..', 'third_party', 'catapult', 'catapult_base'))
45 sys.path.insert(1, catapult_path) 45 sys.path.insert(1, catapult_path)
46 from catapult_base import cloud_storage 46 from catapult_base import cloud_storage # pylint: disable=import-error
47 finally: 47 finally:
48 sys.path = old_sys_path 48 sys.path = old_sys_path
49 49
50 results = [] 50 results = []
51 for affected_file in input_api.AffectedFiles(include_deletes=False): 51 for affected_file in input_api.AffectedFiles(include_deletes=False):
52 filename = affected_file.AbsoluteLocalPath() 52 filename = affected_file.AbsoluteLocalPath()
53 if not filename.endswith('wpr.sha1'): 53 if not filename.endswith('wpr.sha1'):
54 continue 54 continue
55 expected_hash = cloud_storage.ReadHash(filename) 55 expected_hash = cloud_storage.ReadHash(filename)
56 is_wpr_file_uploaded = any( 56 is_wpr_file_uploaded = any(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 bots_string = ';'.join(bots) 132 bots_string = ';'.join(bots)
133 description = original_description 133 description = original_description
134 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string 134 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string
135 results.append(output_api.PresubmitNotifyResult( 135 results.append(output_api.PresubmitNotifyResult(
136 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) 136 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.'))
137 137
138 if description != original_description: 138 if description != original_description:
139 rietveld_obj.update_description(issue, description) 139 rietveld_obj.update_description(issue, description)
140 140
141 return results 141 return results
OLDNEW
« no previous file with comments | « tools/cygprofile/profile_android_startup.py ('k') | tools/perf/generate_profile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698