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

Unified Diff: tests/presubmit_unittest.py

Issue 1181103002: Parallelize pylint PRESUBMIT checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix test Created 5 years, 6 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 | « presubmit_support.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index 0d2b4d68f833e8452495d70019820b91f4797685..f37bf6ca6b3c14ec38e74f9ac3026dd6f311b8f3 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -1183,17 +1183,15 @@ class InputApiUnittest(PresubmitTestsBase):
self.mox.ReplayAll()
members = [
'AbsoluteLocalPaths', 'AffectedFiles', 'AffectedSourceFiles',
- 'AffectedTextFiles',
- 'DEFAULT_BLACK_LIST', 'DEFAULT_WHITE_LIST',
- 'DepotToLocalPath', 'FilterSourceFile', 'LocalPaths',
- 'LocalToDepotPath', 'Command', 'RunTests',
- 'PresubmitLocalPath', 'ReadFile', 'RightHandSideLines', 'ServerPaths',
- 'basename', 'cPickle', 'cpplint', 'cStringIO', 'canned_checks', 'change',
- 'environ', 'glob', 'host_url', 'is_committing', 'json', 'logging',
- 'marshal', 'os_listdir', 'os_walk', 'os_path', 'os_stat', 'owners_db',
- 'pickle', 'platform', 'python_executable', 're', 'rietveld', 'subprocess',
- 'tbr', 'tempfile', 'time', 'traceback', 'unittest', 'urllib2', 'version',
- 'verbose',
+ 'AffectedTextFiles', 'DEFAULT_BLACK_LIST', 'DEFAULT_WHITE_LIST',
+ 'DepotToLocalPath', 'FilterSourceFile', 'LocalPaths', 'LocalToDepotPath',
+ 'Command', 'RunTests', 'PresubmitLocalPath', 'ReadFile',
+ 'RightHandSideLines', 'ServerPaths', 'basename', 'cPickle', 'cpplint',
+ 'cStringIO', 'canned_checks', 'change', 'cpu_count', 'environ', 'glob',
+ 'host_url', 'is_committing', 'json', 'logging', 'marshal', 'os_listdir',
+ 'os_walk', 'os_path', 'os_stat', 'owners_db', 'pickle', 'platform',
+ 'python_executable', 're', 'rietveld', 'subprocess', 'tbr', 'tempfile',
+ 'time', 'traceback', 'unittest', 'urllib2', 'version', 'verbose',
]
# If this test fails, you should add the relevant test.
self.compareMembers(
@@ -1852,6 +1850,7 @@ class CannedChecksUnittest(PresubmitTestsBase):
input_api.tbr = False
input_api.python_executable = 'pyyyyython'
input_api.platform = sys.platform
+ input_api.cpu_count = 2
input_api.time = time
input_api.canned_checks = presubmit_canned_checks
input_api.Command = presubmit.CommandData
@@ -2525,7 +2524,12 @@ class CannedChecksUnittest(PresubmitTestsBase):
pylintrc = os.path.join(_ROOT, 'pylintrc')
CommHelper(input_api,
- ['pyyyyython', pylint, '--args-on-stdin'],
+ ['pyyyyython', pylint, '--args-on-stdin', '--disable=cyclic-import',
+ '--jobs=2'],
+ env=mox.IgnoreArg(), stdin='file1.py\n--rcfile=%s' % pylintrc)
+ CommHelper(input_api,
+ ['pyyyyython', pylint, '--args-on-stdin', '--disable=all',
+ '--enable=cyclic-import'],
env=mox.IgnoreArg(), stdin='file1.py\n--rcfile=%s' % pylintrc)
self.mox.ReplayAll()
« no previous file with comments | « presubmit_support.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698