OLD | NEW |
---|---|
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 | 5 |
6 def _CommonChecks(input_api, output_api): | 6 def _CommonChecks(input_api, output_api): |
7 results = [] | 7 results = [] |
8 | 8 |
9 results.extend(input_api.RunTests(input_api.canned_checks.GetPylint( | 9 results.extend(input_api.RunTests(input_api.canned_checks.GetPylint( |
10 input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), | 10 input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), |
(...skipping 10 matching lines...) Expand all Loading... | |
21 # Temporarily make tools/telemetry/ read-only for the move to catapult. | 21 # Temporarily make tools/telemetry/ read-only for the move to catapult. |
22 | 22 |
23 def other_files(f): | 23 def other_files(f): |
24 this_presubmit_file = input_api.os_path.join( | 24 this_presubmit_file = input_api.os_path.join( |
25 input_api.PresubmitLocalPath(), 'PRESUBMIT.py') | 25 input_api.PresubmitLocalPath(), 'PRESUBMIT.py') |
26 return not f.AbsoluteLocalPath() == this_presubmit_file | 26 return not f.AbsoluteLocalPath() == this_presubmit_file |
27 | 27 |
28 changed_files = input_api.AffectedSourceFiles(other_files) | 28 changed_files = input_api.AffectedSourceFiles(other_files) |
29 if changed_files: | 29 if changed_files: |
30 return [output_api.PresubmitError( | 30 return [output_api.PresubmitError( |
31 'tools/telemetry/ is temporarily read-only while it moves to catapult.' | 31 'tools/telemetry/ has moved to the catapult repo. It is deprecated and ' |
32 '\nPlease make your changes to telemetry/ ' | 32 'scheduled for deletion.' |
nednguyen
2016/01/27 22:33:24
I think the deletion day is 1/29 (in telemetry/__i
aiolos (Not reviewing)
2016/01/27 22:37:29
added.
| |
33 '\nPlease instead make your changes to telemetry/ ' | |
33 'in https://github.com/catapult-project/catapult/tree/master/telemetry.' | 34 'in https://github.com/catapult-project/catapult/tree/master/telemetry.' |
34 '\nContact aiolos@ for further questions. Changed files:\n', | 35 '\nContact aiolos@ for further questions. Changed files:\n', |
35 items=changed_files)] | 36 items=changed_files)] |
36 return [] | 37 return [] |
37 | 38 |
38 | 39 |
39 def _RunArgs(args, input_api): | 40 def _RunArgs(args, input_api): |
40 p = input_api.subprocess.Popen(args, stdout=input_api.subprocess.PIPE, | 41 p = input_api.subprocess.Popen(args, stdout=input_api.subprocess.PIPE, |
41 stderr=input_api.subprocess.STDOUT) | 42 stderr=input_api.subprocess.STDOUT) |
42 out, _ = p.communicate() | 43 out, _ = p.communicate() |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 results = [] | 138 results = [] |
138 results.extend(_CommonChecks(input_api, output_api)) | 139 results.extend(_CommonChecks(input_api, output_api)) |
139 results.extend(_CheckTelemetryBinaryDependencies(input_api, output_api)) | 140 results.extend(_CheckTelemetryBinaryDependencies(input_api, output_api)) |
140 return results | 141 return results |
141 | 142 |
142 | 143 |
143 def CheckChangeOnCommit(input_api, output_api): | 144 def CheckChangeOnCommit(input_api, output_api): |
144 results = [] | 145 results = [] |
145 results.extend(_CommonChecks(input_api, output_api)) | 146 results.extend(_CommonChecks(input_api, output_api)) |
146 return results | 147 return results |
OLD | NEW |