Show More
@@ -230,6 +230,7 b' def run_one(test):' | |||||
230 |
|
230 | |||
231 | err = os.path.join(TESTDIR, test+".err") |
|
231 | err = os.path.join(TESTDIR, test+".err") | |
232 | ref = os.path.join(TESTDIR, test+".out") |
|
232 | ref = os.path.join(TESTDIR, test+".out") | |
|
233 | testpath = os.path.join(TESTDIR, test) | |||
233 |
|
234 | |||
234 | if os.path.exists(err): |
|
235 | if os.path.exists(err): | |
235 | os.remove(err) # Remove any previous output files |
|
236 | os.remove(err) # Remove any previous output files | |
@@ -242,7 +243,7 b' def run_one(test):' | |||||
242 | lctest = test.lower() |
|
243 | lctest = test.lower() | |
243 |
|
244 | |||
244 | if lctest.endswith('.py'): |
|
245 | if lctest.endswith('.py'): | |
245 |
cmd = '%s "%s"' % (python, |
|
246 | cmd = '%s "%s"' % (python, testpath) | |
246 | elif lctest.endswith('.bat'): |
|
247 | elif lctest.endswith('.bat'): | |
247 | # do not run batch scripts on non-windows |
|
248 | # do not run batch scripts on non-windows | |
248 | if os.name != 'nt': |
|
249 | if os.name != 'nt': | |
@@ -250,17 +251,17 b' def run_one(test):' | |||||
250 | return None |
|
251 | return None | |
251 | # To reliably get the error code from batch files on WinXP, |
|
252 | # To reliably get the error code from batch files on WinXP, | |
252 | # the "cmd /c call" prefix is needed. Grrr |
|
253 | # the "cmd /c call" prefix is needed. Grrr | |
253 |
cmd = 'cmd /c call "%s"' % |
|
254 | cmd = 'cmd /c call "%s"' % testpath | |
254 | else: |
|
255 | else: | |
255 | # do not run shell scripts on windows |
|
256 | # do not run shell scripts on windows | |
256 | if os.name == 'nt': |
|
257 | if os.name == 'nt': | |
257 | print '\nSkipping %s: shell script' % test |
|
258 | print '\nSkipping %s: shell script' % test | |
258 | return None |
|
259 | return None | |
259 | # do not try to run non-executable programs |
|
260 | # do not try to run non-executable programs | |
260 |
if not os.access( |
|
261 | if not os.access(testpath, os.X_OK): | |
261 | print '\nSkipping %s: not executable' % test |
|
262 | print '\nSkipping %s: not executable' % test | |
262 | return None |
|
263 | return None | |
263 |
cmd = '"%s"' % |
|
264 | cmd = '"%s"' % testpath | |
264 |
|
265 | |||
265 | if options.timeout > 0: |
|
266 | if options.timeout > 0: | |
266 | signal.alarm(options.timeout) |
|
267 | signal.alarm(options.timeout) |
General Comments 0
You need to be logged in to leave comments.
Login now