Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: PRESUBMIT.py

Issue 137243003: Only run pylint on Windows in PRESUBMIT (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fixes Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698