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
experimental/szager/collated-output
ilevy@chromium.org 13 years ago
parent 25ab274a0a
commit 5678d33ca8

@ -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))

Loading…
Cancel
Save