OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 Blink. | 5 """Top-level presubmit script for Blink. |
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 """Runs checkdeps on #include statements added in this | 182 """Runs checkdeps on #include statements added in this |
183 change. Breaking - rules is an error, breaking ! rules is a | 183 change. Breaking - rules is an error, breaking ! rules is a |
184 warning. | 184 warning. |
185 """ | 185 """ |
186 # We need to wait until we have an input_api object and use this | 186 # We need to wait until we have an input_api object and use this |
187 # roundabout construct to import checkdeps because this file is | 187 # roundabout construct to import checkdeps because this file is |
188 # eval-ed and thus doesn't have __file__. | 188 # eval-ed and thus doesn't have __file__. |
189 original_sys_path = sys.path | 189 original_sys_path = sys.path |
190 try: | 190 try: |
191 sys.path = sys.path + [input_api.os_path.realpath(input_api.os_path.join
( | 191 sys.path = sys.path + [input_api.os_path.realpath(input_api.os_path.join
( |
192 input_api.PresubmitLocalPath(), '..', '..', 'tools', 'checkdeps'
))] | 192 input_api.PresubmitLocalPath(), '..', '..', 'buildtools', 'check
deps'))] |
193 import checkdeps | 193 import checkdeps |
194 from cpp_checker import CppChecker | 194 from cpp_checker import CppChecker |
195 from rules import Rule | 195 from rules import Rule |
196 finally: | 196 finally: |
197 # Restore sys.path to what it was before. | 197 # Restore sys.path to what it was before. |
198 sys.path = original_sys_path | 198 sys.path = original_sys_path |
199 | 199 |
200 added_includes = [] | 200 added_includes = [] |
201 for f in input_api.AffectedFiles(): | 201 for f in input_api.AffectedFiles(): |
202 if not CppChecker.IsCppFile(f.LocalPath()): | 202 if not CppChecker.IsCppFile(f.LocalPath()): |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 'tryserver.chromium': { | 342 'tryserver.chromium': { |
343 'blink_android_compile_dbg': set(['defaulttests']), | 343 'blink_android_compile_dbg': set(['defaulttests']), |
344 'blink_android_compile_rel': set(['defaulttests']), | 344 'blink_android_compile_rel': set(['defaulttests']), |
345 }, | 345 }, |
346 'tryserver.chromium.gpu': { | 346 'tryserver.chromium.gpu': { |
347 'linux_gpu': set(['defaulttests']), | 347 'linux_gpu': set(['defaulttests']), |
348 'mac_gpu': set(['defaulttests']), | 348 'mac_gpu': set(['defaulttests']), |
349 'win_gpu': set(['defaulttests']), | 349 'win_gpu': set(['defaulttests']), |
350 } | 350 } |
351 } | 351 } |
OLD | NEW |