@ -762,6 +762,7 @@ class InputApi(object):
# will run all tests once all PRESUBMIT files are processed.
# will run all tests once all PRESUBMIT files are processed.
tests = [ ]
tests = [ ]
msgs = [ ]
msgs = [ ]
parallel = parallel and self . parallel
for t in tests_mix :
for t in tests_mix :
if isinstance ( t , OutputApi . PresubmitResult ) and t :
if isinstance ( t , OutputApi . PresubmitResult ) and t :
msgs . append ( t )
msgs . append ( t )
@ -773,7 +774,7 @@ class InputApi(object):
if not t . kwargs . get ( ' cwd ' ) :
if not t . kwargs . get ( ' cwd ' ) :
t . kwargs [ ' cwd ' ] = self . PresubmitLocalPath ( )
t . kwargs [ ' cwd ' ] = self . PresubmitLocalPath ( )
self . thread_pool . AddTests ( tests , parallel )
self . thread_pool . AddTests ( tests , parallel )
if not self . parallel :
if not parallel :
msgs . extend ( self . thread_pool . RunAsync ( ) )
msgs . extend ( self . thread_pool . RunAsync ( ) )
return msgs
return msgs
@ -1530,8 +1531,8 @@ def DoPresubmitChecks(change,
output . write ( " Warning, no PRESUBMIT.py found. \n " )
output . write ( " Warning, no PRESUBMIT.py found. \n " )
results = [ ]
results = [ ]
thread_pool = ThreadPool ( )
thread_pool = ThreadPool ( )
executer = PresubmitExecuter ( change , committing , verbose ,
executer = PresubmitExecuter ( change , committing , verbose , gerrit_obj ,
gerrit_obj, dry_run, thread_poo l)
dry_run, thread_poo l, paralle l)
if default_presubmit :
if default_presubmit :
if verbose :
if verbose :
output . write ( " Running default presubmit script. \n " )
output . write ( " Running default presubmit script. \n " )