# HG changeset patch # User Pierre-Yves David # Date 1431068647 25200 # Node ID f52c5701925af33cac60c6d1770ba15277f9ff5b # Parent e91b32d3c67b91e5ba0ff0f5b341930d64b6058a run-tests: allow different extra weight for slow tests The 'test-check-code-hg.t' file is not big enough to be prioritized properly. As a result my tests run often spend about 15 seconds running only it at the end of its tests run. We make the "slow" mechanism a bit smarter to adjust the extra weight of each category independently in a future patch. diff -r e91b32d3c67b -r f52c5701925a tests/run-tests.py --- a/tests/run-tests.py Thu May 07 21:00:46 2015 -0700 +++ b/tests/run-tests.py Fri May 08 00:04:07 2015 -0700 @@ -1662,7 +1662,10 @@ random.shuffle(tests) else: # keywords for slow tests - slow = b'svn gendoc check-code-hg'.split() + slow = {b'svn': 10, + b'gendoc': 10, + b'check-code-hg': 10, + } def sortkey(f): # run largest tests first, as they tend to take the longest try: @@ -1671,9 +1674,9 @@ if e.errno != errno.ENOENT: raise return -1e9 # file does not exist, tell early - for kw in slow: + for kw, mul in slow.iteritems(): if kw in f: - val *= 10 + val *= mul return val tests.sort(key=sortkey)