From 5678d33ca8ffaf3adcbc7d062c2eae0ef9eb6282 Mon Sep 17 00:00:00 2001 From: "ilevy@chromium.org" Date: Sat, 18 May 2013 01:34:14 +0000 Subject: [PATCH] Change parallel test logic to run only with jobs>1 Regular map is preferred when parallization does not speed presubmit tests. It makes stacktraces more understandable and facilitates debugging. Only use parallel pool when tests > 1. R=maruel@chromium.org Review URL: https://chromiumcodereview.appspot.com/15385002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@200940 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presubmit_support.py b/presubmit_support.py index 23cc5e427a..9baee8c5c0 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))