Commit 9c60ab23 authored by ilevy@chromium.org's avatar ilevy@chromium.org

Fix RunTests to not stall on empty test list

Some PRESUBMIT files dynamically generate test list
and so may pass an empty list to RunTests.  There
appears to be a bug in multiprocessing.Pool that
causes a stall in map_async with an empty list.

TBR=maruel

Review URL: https://chromiumcodereview.appspot.com/14962011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@200613 0039d316-1c4b-4281-b951-d872f2087c98
parent 437133a7
......@@ -478,7 +478,7 @@ class InputApi(object):
else:
assert issubclass(t.message, _PresubmitResult)
tests.append(t)
if parallel:
if tests and parallel:
pool = multiprocessing.Pool()
# async recipe works around multiprocessing bug handling Ctrl-C
msgs.extend(pool.map_async(CallCommand, tests).get(99999))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment