mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
lit: When running Tcl scripts via shell, try harder to find 'bash', but fall
back to running them internally if that fails. PR5240. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84462 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -237,7 +237,9 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
|
||||
for c in cmds[1:]:
|
||||
cmd = ShUtil.Seq(cmd, '&&', c)
|
||||
|
||||
if litConfig.useTclAsSh:
|
||||
# FIXME: This is lame, we shouldn't need bash. See PR5240.
|
||||
bashPath = litConfig.getBashPath()
|
||||
if litConfig.useTclAsSh and bashPath:
|
||||
script = tmpBase + '.script'
|
||||
|
||||
# Write script file
|
||||
@@ -252,7 +254,7 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
|
||||
print >>sys.stdout
|
||||
return '', '', 0
|
||||
|
||||
command = ['/bin/bash', script]
|
||||
command = [litConfig.getBashPath(), script]
|
||||
out,err,exitCode = executeCommand(command, cwd=cwd,
|
||||
env=test.config.environment)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user