Mercurial > hg
changeset 25067:f52c5701925a
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 08 May 2015 00:04:07 -0700 |
parents | e91b32d3c67b |
children | f66fc374d2d7 |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)