Show More
@@ -454,13 +454,6 b' def shtest(test, options, replacements):' | |||
|
454 | 454 | vlog("# Running", cmd) |
|
455 | 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 | 457 | def tsttest(test, options, replacements): |
|
465 | 458 | t = open(test) |
|
466 | 459 | out = [] |
@@ -664,22 +657,12 b' def runone(options, test, skips, fails):' | |||
|
664 | 657 | |
|
665 | 658 | if lctest.endswith('.py') or firstline == '#!/usr/bin/env python': |
|
666 | 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 | 660 | elif lctest.endswith('.t'): |
|
673 | 661 | runner = tsttest |
|
674 | 662 | ref = testpath |
|
675 | 663 | else: |
|
676 | # do not run shell scripts on windows | |
|
677 | if os.name == 'nt': | |
|
678 | return skip("shell script") | |
|
679 | 664 | # do not try to run non-executable programs |
|
680 |
if not os. |
|
|
681 | return fail("does not exist") | |
|
682 | elif not os.access(testpath, os.X_OK): | |
|
665 | if not os.access(testpath, os.X_OK): | |
|
683 | 666 | return skip("not executable") |
|
684 | 667 | runner = shtest |
|
685 | 668 |
General Comments 0
You need to be logged in to leave comments.
Login now