tests/run-tests.py
changeset 19315 401b3ad26e66
parent 19312 aedb4d0012ff
child 19322 ff1586a3adc5
equal deleted inserted replaced
19314:bc82abe500a9 19315:401b3ad26e66
  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)