Show More
@@ -454,13 +454,6 b' def shtest(test, options, replacements):' | |||||
454 | vlog("# Running", cmd) |
|
454 | vlog("# Running", cmd) | |
455 | return run(cmd, options, replacements) |
|
455 | return run(cmd, options, replacements) | |
456 |
|
456 | |||
457 | def battest(test, options, replacements): |
|
|||
458 | # To reliably get the error code from batch files on WinXP, |
|
|||
459 | # the "cmd /c call" prefix is needed. Grrr |
|
|||
460 | cmd = 'cmd /c call "%s"' % testpath |
|
|||
461 | vlog("# Running", cmd) |
|
|||
462 | return run(cmd, options, replacements) |
|
|||
463 |
|
||||
464 | def tsttest(test, options, replacements): |
|
457 | def tsttest(test, options, replacements): | |
465 | t = open(test) |
|
458 | t = open(test) | |
466 | out = [] |
|
459 | out = [] | |
@@ -664,22 +657,12 b' def runone(options, test, skips, fails):' | |||||
664 |
|
657 | |||
665 | if lctest.endswith('.py') or firstline == '#!/usr/bin/env python': |
|
658 | if lctest.endswith('.py') or firstline == '#!/usr/bin/env python': | |
666 | runner = pytest |
|
659 | runner = pytest | |
667 | elif lctest.endswith('.bat'): |
|
|||
668 | # do not run batch scripts on non-windows |
|
|||
669 | if os.name != 'nt': |
|
|||
670 | return skip("batch script") |
|
|||
671 | runner = battest |
|
|||
672 | elif lctest.endswith('.t'): |
|
660 | elif lctest.endswith('.t'): | |
673 | runner = tsttest |
|
661 | runner = tsttest | |
674 | ref = testpath |
|
662 | ref = testpath | |
675 | else: |
|
663 | else: | |
676 | # do not run shell scripts on windows |
|
|||
677 | if os.name == 'nt': |
|
|||
678 | return skip("shell script") |
|
|||
679 | # do not try to run non-executable programs |
|
664 | # do not try to run non-executable programs | |
680 |
if not os. |
|
665 | if not os.access(testpath, os.X_OK): | |
681 | return fail("does not exist") |
|
|||
682 | elif not os.access(testpath, os.X_OK): |
|
|||
683 | return skip("not executable") |
|
666 | return skip("not executable") | |
684 | runner = shtest |
|
667 | runner = shtest | |
685 |
|
668 |
General Comments 0
You need to be logged in to leave comments.
Login now