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 """Presubmit script for changes affecting extensions docs server | 5 """Presubmit script for changes affecting extensions docs server |
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 # Run build_server so that files needed by tests are copied to the local | 11 # Run build_server so that files needed by tests are copied to the local |
12 # third_party directory. | 12 # third_party directory. |
13 import sys | 13 import sys |
14 sys.path.insert(0, '.') | 14 sys.path.insert(0, '.') |
15 import build_server | 15 import build_server |
16 build_server.main() | 16 build_server.main() |
17 sys.path.pop(0) | 17 sys.path.pop(0) |
18 | 18 |
19 WHITELIST = [ r'.+_test.py$' ] | 19 # TODO(kalman): Include integration_test.py again. |
| 20 WHITELIST = [ r'^[^i].+_test.py$' ] |
20 | 21 |
21 def CheckChangeOnUpload(input_api, output_api): | 22 def CheckChangeOnUpload(input_api, output_api): |
22 return input_api.canned_checks.RunUnitTestsInDirectory( | 23 return input_api.canned_checks.RunUnitTestsInDirectory( |
23 input_api, output_api, '.', whitelist=WHITELIST) | 24 input_api, output_api, '.', whitelist=WHITELIST) |
24 | 25 |
25 def CheckChangeOnCommit(input_api, output_api): | 26 def CheckChangeOnCommit(input_api, output_api): |
26 return input_api.canned_checks.RunUnitTestsInDirectory( | 27 return input_api.canned_checks.RunUnitTestsInDirectory( |
27 input_api, output_api, '.', whitelist=WHITELIST) | 28 input_api, output_api, '.', whitelist=WHITELIST) |
OLD | NEW |