tests/run-tests.py
branchstable
changeset 1274 f1a4e67c41fe
parent 1273 4598906608cf
child 1276 509a9dd1553c
equal deleted inserted replaced
1273:4598906608cf 1274:f1a4e67c41fe
  1163     else:
  1163     else:
  1164         # keywords for slow tests
  1164         # keywords for slow tests
  1165         slow = 'svn gendoc check-code-hg'.split()
  1165         slow = 'svn gendoc check-code-hg'.split()
  1166         def sortkey(f):
  1166         def sortkey(f):
  1167             # run largest tests first, as they tend to take the longest
  1167             # run largest tests first, as they tend to take the longest
  1168             val = -os.stat(f).st_size
  1168             try:
       
  1169                 val = -os.stat(f).st_size
       
  1170             except OSError, e:
       
  1171                 if e.errno != errno.ENOENT:
       
  1172                     raise
       
  1173                 return -1e9 # file does not exist, tell early
  1169             for kw in slow:
  1174             for kw in slow:
  1170                 if kw in f:
  1175                 if kw in f:
  1171                     val *= 10
  1176                     val *= 10
  1172             return val
  1177             return val
  1173         tests.sort(key=sortkey)
  1178         tests.sort(key=sortkey)