Don't run many threads when only one test is specified

This commit is contained in:
Dmitry Babokin
2013-04-25 21:12:16 +04:00
parent 1069a3c77e
commit cbb0d6ce06

View File

@@ -398,6 +398,7 @@ if __name__ == '__main__':
run_error_files = [ ]
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))
# put each of the test filenames into a queue