Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 40244:1039404c5e1d
run-tests: print number of tests and parallel process count
This seems like a useful output message to have.
I also sneak in a change to lower the parallel process count if it
is larger than the number of tests, as that makes no sense and output
saying we're running more tests in parallel than there exists tests would
be wonky.
Differential Revision: https://phab.mercurial-scm.org/D5070
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 13 Oct 2018 12:11:45 +0200 |
parents | 0f8ff3ff5d5c |
children | e7e70c033783 |
line wrap: on
line diff
--- a/tests/run-tests.py Sat Oct 13 12:29:43 2018 +0200 +++ b/tests/run-tests.py Sat Oct 13 12:11:45 2018 +0200 @@ -2795,13 +2795,15 @@ tests = [self._gettest(d, i) for i, d in enumerate(testdescs)] + jobs = min(len(tests), self.options.jobs) + failed = False kws = self.options.keywords if kws is not None and PYTHON3: kws = kws.encode('utf-8') suite = TestSuite(self._testdir, - jobs=self.options.jobs, + jobs=jobs, whitelist=self.options.whitelisted, blacklist=self.options.blacklist, retest=self.options.retest, @@ -2829,6 +2831,9 @@ assert self._installdir self._installchg() + log('running %d tests using %d parallel processes' % ( + len(tests), jobs)) + result = runner.run(suite) if result.failures: