changeset 19315:401b3ad26e66

run-tests: sort missing files first instead of raising an error sort first for early telling typos in test names
author simon@laptop-tosh
date Tue, 11 Jun 2013 23:39:48 +0200
parents bc82abe500a9
children f266cb3f1c2b
files tests/run-tests.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Thu May 30 19:29:21 2013 -0700
+++ b/tests/run-tests.py	Tue Jun 11 23:39:48 2013 +0200
@@ -1165,7 +1165,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