Don't run many threads when only one test is specified
This commit is contained in:
@@ -398,6 +398,7 @@ if __name__ == '__main__':
|
|||||||
run_error_files = [ ]
|
run_error_files = [ ]
|
||||||
|
|
||||||
nthreads = min(multiprocessing.cpu_count(), options.num_jobs)
|
nthreads = min(multiprocessing.cpu_count(), options.num_jobs)
|
||||||
|
nthreads = min(nthreads, len(files))
|
||||||
sys.stdout.write("Running %d jobs in parallel. Running %d tests.\n" % (nthreads, total_tests))
|
sys.stdout.write("Running %d jobs in parallel. Running %d tests.\n" % (nthreads, total_tests))
|
||||||
|
|
||||||
# put each of the test filenames into a queue
|
# put each of the test filenames into a queue
|
||||||
|
|||||||
Reference in New Issue
Block a user