OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
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 gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
11 | 11 |
12 import re | 12 import re |
13 | 13 |
14 | 14 |
15 _EXCLUDED_PATHS = ( | 15 _EXCLUDED_PATHS = ( |
16 r"^breakpad[\\\/].*", | 16 r"^breakpad[\\\/].*", |
17 r"^net/tools/spdyshark/[\\\/].*", | 17 r"^native_client_sdk[\\\/].*", |
| 18 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*", |
18 r"^skia[\\\/].*", | 19 r"^skia[\\\/].*", |
19 r"^v8[\\\/].*", | 20 r"^v8[\\\/].*", |
20 r".*MakeFile$", | 21 r".*MakeFile$", |
21 ) | 22 ) |
22 | 23 |
23 | 24 |
24 _TEST_ONLY_WARNING = ( | 25 _TEST_ONLY_WARNING = ( |
25 'You might be calling functions intended only for testing from\n' | 26 'You might be calling functions intended only for testing from\n' |
26 'production code. It is OK to ignore this warning if you know what\n' | 27 'production code. It is OK to ignore this warning if you know what\n' |
27 'you are doing, as the heuristics used to detect the situation are\n' | 28 'you are doing, as the heuristics used to detect the situation are\n' |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 def GetPreferredTrySlaves(project, change): | 336 def GetPreferredTrySlaves(project, change): |
336 only_objc_files = all( | 337 only_objc_files = all( |
337 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles()) | 338 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles()) |
338 if only_objc_files: | 339 if only_objc_files: |
339 return ['mac_rel'] | 340 return ['mac_rel'] |
340 preferred = ['win_rel', 'linux_rel', 'mac_rel'] | 341 preferred = ['win_rel', 'linux_rel', 'mac_rel'] |
341 aura_re = '_aura[^/]*[.][^/]*' | 342 aura_re = '_aura[^/]*[.][^/]*' |
342 if any(re.search(aura_re, f.LocalPath()) for f in change.AffectedFiles()): | 343 if any(re.search(aura_re, f.LocalPath()) for f in change.AffectedFiles()): |
343 preferred.append('linux_chromeos_aura:compile') | 344 preferred.append('linux_chromeos_aura:compile') |
344 return preferred | 345 return preferred |
OLD | NEW |