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

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

Issue 21684002: [telemetry] Automatic hash file creation and upload to Cloud Storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add to unit tests. Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/perf/page_sets/.gitignore » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 import os 4 import os
5 import sys 5 import sys
6 6
7
7 PYLINT_BLACKLIST = [] 8 PYLINT_BLACKLIST = []
8 PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101'] 9 PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101']
9 10
11
10 def _CommonChecks(input_api, output_api): 12 def _CommonChecks(input_api, output_api):
11 results = [] 13 results = []
12 old_sys_path = sys.path 14 old_sys_path = sys.path
13 try: 15 try:
14 sys.path = [os.path.join('..', 'telemetry')] + sys.path 16 sys.path = [os.path.join(os.pardir, 'telemetry')] + sys.path
15 results.extend(input_api.canned_checks.RunPylint( 17 results.extend(input_api.canned_checks.RunPylint(
16 input_api, output_api, 18 input_api, output_api,
17 black_list=PYLINT_BLACKLIST, 19 black_list=PYLINT_BLACKLIST,
18 disabled_warnings=PYLINT_DISABLED_WARNINGS)) 20 disabled_warnings=PYLINT_DISABLED_WARNINGS))
19 finally: 21 finally:
20 sys.path = old_sys_path 22 sys.path = old_sys_path
21 return results 23 return results
22 24
25
23 def CheckChangeOnUpload(input_api, output_api): 26 def CheckChangeOnUpload(input_api, output_api):
24 report = [] 27 report = []
25 report.extend(_CommonChecks(input_api, output_api)) 28 report.extend(_CommonChecks(input_api, output_api))
26 return report 29 return report
27 30
31
28 def CheckChangeOnCommit(input_api, output_api): 32 def CheckChangeOnCommit(input_api, output_api):
29 report = [] 33 report = []
30 report.extend(_CommonChecks(input_api, output_api)) 34 report.extend(_CommonChecks(input_api, output_api))
31 return report 35 return report
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698