| Index: PRESUBMIT.py
|
| diff --git a/PRESUBMIT.py b/PRESUBMIT.py
|
| index 4b7742ba46126b889bc52d33501c39243800f361..a56b4834a9dd2bf157b5b01fff7246e4bb5a0cd1 100644
|
| --- a/PRESUBMIT.py
|
| +++ b/PRESUBMIT.py
|
| @@ -23,21 +23,26 @@ 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
|
| + if not input_api.platform.startswith(('cygwin', 'win32')):
|
| + tests.extend(unit_tests)
|
| + else:
|
| + print('Warning: not running unit tests on Windows')
|
| + results.extend(input_api.RunTests(tests))
|
| return results
|
|
|
|
|
|
|