aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-05-27 10:50:35 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-05-27 10:50:35 -0700
commitb70a0856390a0ecd1e493a40fe9448d256340a8c (patch)
tree8f9936fee2f62d3b0c4c14bf4c741985107b7352
parent30976732532f78956d34f682c23fe4bdf35d6d52 (diff)
parentda2220aeedf7e104d96753b17330daa8a6244b96 (diff)
Merge pull request #1729 from ctiller/its-raining-jobs
Make -j on run_tests work as expected
-rwxr-xr-xtools/run_tests/run_tests.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 3a344693c1..2428e21ca3 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -57,7 +57,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
@@ -93,7 +92,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):
@@ -333,7 +331,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,
@@ -455,7 +453,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
finally: