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

Unified Diff: presubmit_support.py

Issue 15385002: Change parallel test logic to run only with jobs>1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 7 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_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 23cc5e427ab9cfe101e5cdc0ad65da14e0312807..9baee8c5c0b90d51ada1fa560dc338b90b44a802 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -478,7 +478,7 @@ class InputApi(object):
else:
assert issubclass(t.message, _PresubmitResult)
tests.append(t)
- if tests and parallel:
+ if len(tests) > 1 and parallel:
pool = multiprocessing.Pool()
# async recipe works around multiprocessing bug handling Ctrl-C
msgs.extend(pool.map_async(CallCommand, tests).get(99999))
« 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