equal
deleted
inserted
replaced
1160 tests = args |
1160 tests = args |
1161 |
1161 |
1162 if options.random: |
1162 if options.random: |
1163 random.shuffle(tests) |
1163 random.shuffle(tests) |
1164 else: |
1164 else: |
1165 # run largest tests first, as they tend to take the longest |
1165 # keywords for slow tests |
1166 tests.sort(key=lambda x: -os.stat(x).st_size) |
1166 slow = 'svn gendoc check-code-hg'.split() |
|
1167 def sortkey(f): |
|
1168 # run largest tests first, as they tend to take the longest |
|
1169 val = -os.stat(f).st_size |
|
1170 for kw in slow: |
|
1171 if kw in f: |
|
1172 val *= 10 |
|
1173 return val |
|
1174 tests.sort(key=sortkey) |
1167 |
1175 |
1168 if 'PYTHONHASHSEED' not in os.environ: |
1176 if 'PYTHONHASHSEED' not in os.environ: |
1169 # use a random python hash seed all the time |
1177 # use a random python hash seed all the time |
1170 # we do the randomness ourself to know what seed is used |
1178 # we do the randomness ourself to know what seed is used |
1171 os.environ['PYTHONHASHSEED'] = str(random.getrandbits(32)) |
1179 os.environ['PYTHONHASHSEED'] = str(random.getrandbits(32)) |