OLD | NEW |
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 | 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 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 'OS_CAT', # For testing. | 172 'OS_CAT', # For testing. |
173 'OS_CHROMEOS', | 173 'OS_CHROMEOS', |
174 'OS_FREEBSD', | 174 'OS_FREEBSD', |
175 'OS_IOS', | 175 'OS_IOS', |
176 'OS_LINUX', | 176 'OS_LINUX', |
177 'OS_MACOSX', | 177 'OS_MACOSX', |
178 'OS_NACL', | 178 'OS_NACL', |
179 'OS_OPENBSD', | 179 'OS_OPENBSD', |
180 'OS_POSIX', | 180 'OS_POSIX', |
181 'OS_SOLARIS', | 181 'OS_SOLARIS', |
182 'OS_SUN', # Not in build/build_config.h but in skia. | |
183 'OS_WIN', | 182 'OS_WIN', |
184 ) | 183 ) |
185 | 184 |
186 | 185 |
187 def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): | 186 def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api): |
188 """Attempts to prevent use of functions intended only for testing in | 187 """Attempts to prevent use of functions intended only for testing in |
189 non-testing code. For now this is just a best-effort implementation | 188 non-testing code. For now this is just a best-effort implementation |
190 that ignores header files and may have some false positives. A | 189 that ignores header files and may have some false positives. A |
191 better implementation would probably need a proper C++ parser. | 190 better implementation would probably need a proper C++ parser. |
192 """ | 191 """ |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 'win_rel', | 918 'win_rel', |
920 'win:compile', | 919 'win:compile', |
921 ] | 920 ] |
922 | 921 |
923 # Match things like path/aura/file.cc and path/file_aura.cc. | 922 # Match things like path/aura/file.cc and path/file_aura.cc. |
924 # Same for chromeos. | 923 # Same for chromeos. |
925 if any(re.search('[/_](aura|chromeos)', f) for f in files): | 924 if any(re.search('[/_](aura|chromeos)', f) for f in files): |
926 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] | 925 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] |
927 | 926 |
928 return trybots | 927 return trybots |
OLD | NEW |