Chromium Code Reviews| Index: PRESUBMIT.py |
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
| index 4b7742ba46126b889bc52d33501c39243800f361..f472f2bbd85b75f63c9cab1d4351984abf89490a 100644 |
| --- a/PRESUBMIT.py |
| +++ b/PRESUBMIT.py |
| @@ -23,21 +23,27 @@ def CommonChecks(input_api, output_api, tests_to_black_list): |
| 'R0401', # Cyclic import |
| 'W0613', # Unused argument |
| ] |
| - results.extend(input_api.RunTests( |
| - input_api.canned_checks.GetPylint( |
| - input_api, |
| - output_api, |
| - white_list=[r'.*\.py$'], |
| - black_list=black_list, |
| - disabled_warnings=disabled_warnings) + |
| - # TODO(maruel): Make sure at least one file is modified first. |
| - # TODO(maruel): If only tests are modified, only run them. |
| - input_api.canned_checks.GetUnitTestsInDirectory( |
| - input_api, |
| - output_api, |
| - 'tests', |
| - whitelist=[r'.*test\.py$'], |
| - blacklist=tests_to_black_list))) |
| + pylint = input_api.canned_checks.GetPylint( |
| + input_api, |
| + output_api, |
| + white_list=[r'.*\.py$'], |
| + black_list=black_list, |
| + disabled_warnings=disabled_warnings) |
| + # TODO(maruel): Make sure at least one file is modified first. |
| + # TODO(maruel): If only tests are modified, only run them. |
| + unit_tests = input_api.canned_checks.GetUnitTestsInDirectory( |
| + input_api, |
| + output_api, |
| + 'tests', |
| + whitelist=[r'.*test\.py$'], |
| + blacklist=tests_to_black_list) |
| + tests = pylint |
| + import sys |
| + if not sys.platform.startswith(('cygwin', 'win32')): |
|
M-A Ruel
2014/01/17 02:12:26
if not input_api.platform.startswith(('cygwin', 'w
scottmg
2014/01/17 03:53:10
Done.
|
| + tests += unit_tests |
|
M-A Ruel
2014/01/17 02:12:26
tests.extend(unit_tests)
scottmg
2014/01/17 03:53:10
Done.
|
| + else: |
| + print('Warning: not running unit tests on Windows') |
| + results.extend(input_api.RunTests(tests)) |
| return results |