diff options
author | Craig Tiller <ctiller@google.com> | 2015-05-22 14:04:06 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-05-22 14:04:06 -0700 |
commit | 83762ac78dac6a0df362905234d3dc526af5449a (patch) | |
tree | eb0aabe594d2c075c9e392963b4702981fbc2051 /tools | |
parent | 5fa2eab4f4071303b269155c0393e2b63483af7b (diff) |
Make -j on run_tests work as expected
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/run_tests.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 1f94238a50..452e1c47e9 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -56,7 +56,6 @@ class SimpleConfig(object): if environ is None: environ = {} self.build_config = config - self.maxjobs = 2 * multiprocessing.cpu_count() self.allow_hashing = (config != 'gcov') self.environ = environ self.environ['CONFIG'] = config @@ -92,7 +91,6 @@ class ValgrindConfig(object): self.build_config = config self.tool = tool self.args = args - self.maxjobs = 2 * multiprocessing.cpu_count() self.allow_hashing = False def job_spec(self, cmdline, hash_targets): @@ -332,7 +330,7 @@ argp.add_argument('-c', '--config', default=_DEFAULT) argp.add_argument('-n', '--runs_per_test', default=1, type=int) argp.add_argument('-r', '--regex', default='.*', type=str) -argp.add_argument('-j', '--jobs', default=1000, type=int) +argp.add_argument('-j', '--jobs', default=2 * multiprocessing.cpu_count(), type=int) argp.add_argument('-s', '--slowdown', default=1.0, type=float) argp.add_argument('-f', '--forever', default=False, @@ -449,7 +447,7 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): itertools.repeat(one_run, runs_per_test)) if not jobset.run(all_runs, check_cancelled, newline_on_success=newline_on_success, travis=travis, - maxjobs=min(args.jobs, min(c.maxjobs for c in run_configs)), + maxjobs=args.jobs, cache=cache): return 2 |