Default to one thread per CPU, instead of 16 regardless of the number of CPUs This should be a better default for systems with few (or very many) cores. Also, since we began starting the longest-running tests first, there's no longer any need for extra parallelism just to get those tests to start earlier.
diff --git a/gtest-parallel b/gtest-parallel index 58d2a67..21c6ee0 100755 --- a/gtest-parallel +++ b/gtest-parallel
@@ -14,6 +14,7 @@ # limitations under the License. import cPickle import gzip +import multiprocessing import optparse import os import subprocess @@ -146,7 +147,8 @@ parser.add_option('-r', '--repeat', type='int', default=1, help='repeat tests') -parser.add_option('-w', '--workers', type='int', default=16, +parser.add_option('-w', '--workers', type='int', + default=multiprocessing.cpu_count(), help='number of workers to spawn') parser.add_option('--gtest_color', type='string', default='yes', help='color output')