[PATCH] run-tests: sort missing files first instead of raising an error
Simon Heimberg
simohe at besonet.ch
Tue Jun 11 22:09:22 UTC 2013
# HG changeset patch
# User simon at laptop-tosh
# Date 1370986788 -7200
# Node ID 3a43e3a9de8e3002b9ce1ef97398054b7c65e356
# Parent 893563fd066688b54c9b35dcd59ddce978ecf44e
run-tests: sort missing files first instead of raising an error
sort first for early telling typos in test names
diff -r 893563fd0666 -r 3a43e3a9de8e tests/run-tests.py
--- a/tests/run-tests.py Die Jun 11 23:36:46 2013 +0200
+++ b/tests/run-tests.py Die Jun 11 23:39:48 2013 +0200
@@ -1156,7 +1156,12 @@
slow = 'svn gendoc check-code-hg'.split()
def sortkey(f):
# run largest tests first, as they tend to take the longest
- val = -os.stat(f).st_size
+ try:
+ val = -os.stat(f).st_size
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ return -1e9 # file does not exist, tell early
for kw in slow:
if kw in f:
val *= 10
More information about the Mercurial-devel
mailing list