Mercurial > hg-stable
changeset 19277:09e1c148e847
run-tests: schedule largest tests first
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 02 Jun 2013 17:56:51 -0500 |
parents | e55751963889 |
children | bc35b9ed3ae7 |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Jun 02 16:58:22 2013 -0500 +++ b/tests/run-tests.py Sun Jun 02 17:56:51 2013 -0500 @@ -1287,14 +1287,17 @@ checktools() if len(args) == 0: - args = sorted(t for t in os.listdir(".") - if t.startswith("test-") - and (t.endswith(".py") or t.endswith(".t"))) + args = [t for t in os.listdir(".") + if t.startswith("test-") + and (t.endswith(".py") or t.endswith(".t"))] tests = args if options.random: random.shuffle(tests) + else: + # run largest tests first, as they tend to take the longest + tests.sort(key=lambda x: -os.stat(x).st_size) if 'PYTHONHASHSEED' not in os.environ: # use a random python hash seed all the time