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 | 5 |
6 WHITELIST = [ r'.+_test.py$' ] | 6 WHITELIST = [ r'^.+_test\.py$' ] |
7 | 7 |
8 def CheckChangeOnUpload(input_api, output_api): | 8 def CheckChangeOnUpload(input_api, output_api): |
9 return input_api.canned_checks.RunUnitTestsInDirectory( | 9 return input_api.canned_checks.RunUnitTestsInDirectory( |
10 input_api, output_api, '.', whitelist=WHITELIST) | 10 input_api, output_api, '.', whitelist=WHITELIST) |
11 | 11 |
12 | 12 |
13 def CheckChangeOnCommit(input_api, output_api): | 13 def CheckChangeOnCommit(input_api, output_api): |
14 return input_api.canned_checks.RunUnitTestsInDirectory( | 14 return input_api.canned_checks.RunUnitTestsInDirectory( |
15 input_api, output_api, '.', whitelist=WHITELIST) | 15 input_api, output_api, '.', whitelist=WHITELIST) |
OLD | NEW |