# HG changeset patch # User Martin von Zweigbergk # Date 1547159556 28800 # Node ID 53327bfbf35d255a4e1e96ed2a4aedaa71e98d5c # Parent 5838afea82138644c8d13a0157660bacc3f5de32 testrunner: make `-j100 --runs-per-test=100 test-foo.t` use 100 jobs It would use only 1 job since 1039404c5e1d (run-tests: print number of tests and parallel process count, 2018-10-13), but I'm pretty sure that was unintentional. Differential Revision: https://phab.mercurial-scm.org/D5557 diff -r 5838afea8213 -r 53327bfbf35d tests/run-tests.py --- a/tests/run-tests.py Sun Jan 06 23:37:13 2019 -0800 +++ b/tests/run-tests.py Thu Jan 10 14:32:36 2019 -0800 @@ -2859,8 +2859,9 @@ testdescs = orig tests = [self._gettest(d, i) for i, d in enumerate(testdescs)] - - jobs = min(len(tests), self.options.jobs) + num_tests = len(tests) * self.options.runs_per_test + + jobs = min(num_tests, self.options.jobs) failed = False kws = self.options.keywords @@ -2897,7 +2898,7 @@ self._installchg() log('running %d tests using %d parallel processes' % ( - len(tests), jobs)) + num_tests, jobs)) result = runner.run(suite) diff -r 5838afea8213 -r 53327bfbf35d tests/test-run-tests.t --- a/tests/test-run-tests.t Sun Jan 06 23:37:13 2019 -0800 +++ b/tests/test-run-tests.t Thu Jan 10 14:32:36 2019 -0800 @@ -716,6 +716,12 @@ (delete the duplicated test file) $ rm test-failure-copy.t +multiple runs per test should be parallelized + + $ rt --jobs 2 --runs-per-test 2 test-success.t + running 2 tests using 2 parallel processes + .. + # Ran 2 tests, 0 skipped, 0 failed. Interactive run ===============