mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
utils/lit/lit/TestRunner.py: bash is available with MSYS on Python/W32. Then we can execute "bash tests".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c3ed6b046
commit
9869c2f717
@ -337,23 +337,28 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
|
|||||||
return out, err, exitCode
|
return out, err, exitCode
|
||||||
|
|
||||||
def executeScript(test, litConfig, tmpBase, commands, cwd):
|
def executeScript(test, litConfig, tmpBase, commands, cwd):
|
||||||
|
bashPath = litConfig.getBashPath();
|
||||||
|
isWin32CMDEXE = (litConfig.isWindows and not bashPath)
|
||||||
script = tmpBase + '.script'
|
script = tmpBase + '.script'
|
||||||
if litConfig.isWindows:
|
if isWin32CMDEXE:
|
||||||
script += '.bat'
|
script += '.bat'
|
||||||
|
|
||||||
# Write script file
|
# Write script file
|
||||||
f = open(script,'w')
|
f = open(script,'w')
|
||||||
if litConfig.isWindows:
|
if isWin32CMDEXE:
|
||||||
f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
|
f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
|
||||||
else:
|
else:
|
||||||
f.write(' &&\n'.join(commands))
|
f.write(' &&\n'.join(commands))
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if litConfig.isWindows:
|
if isWin32CMDEXE:
|
||||||
command = ['cmd','/c', script]
|
command = ['cmd','/c', script]
|
||||||
else:
|
else:
|
||||||
command = ['/bin/sh', script]
|
if bashPath:
|
||||||
|
command = [bashPath, script]
|
||||||
|
else:
|
||||||
|
command = ['/bin/sh', script]
|
||||||
if litConfig.useValgrind:
|
if litConfig.useValgrind:
|
||||||
# FIXME: Running valgrind on sh is overkill. We probably could just
|
# FIXME: Running valgrind on sh is overkill. We probably could just
|
||||||
# run on clang with no real loss.
|
# run on clang with no real loss.
|
||||||
@ -553,7 +558,7 @@ def executeShTest(test, litConfig, useExternalSh):
|
|||||||
if test.config.unsupported:
|
if test.config.unsupported:
|
||||||
return (Test.UNSUPPORTED, 'Test is unsupported')
|
return (Test.UNSUPPORTED, 'Test is unsupported')
|
||||||
|
|
||||||
res = parseIntegratedTestScript(test)
|
res = parseIntegratedTestScript(test, useExternalSh)
|
||||||
if len(res) == 2:
|
if len(res) == 2:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user