summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/TestRunner.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-19 03:54:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-19 03:54:21 +0000
commit7e8cf910e4a66f2c217dc4ba7c34f1057d7a7d73 (patch)
tree5fa9a10f2b743f117674eb2e4843b815ffdbe172 /llvm/utils/lit/TestRunner.py
parent0eb0378ad8423f15e70173cdf7d4f7ce41676ad0 (diff)
downloadbcm5719-llvm-7e8cf910e4a66f2c217dc4ba7c34f1057d7a7d73.tar.gz
bcm5719-llvm-7e8cf910e4a66f2c217dc4ba7c34f1057d7a7d73.zip
lit: When running Tcl scripts via shell, try harder to find 'bash', but fall
back to running them internally if that fails. PR5240. llvm-svn: 84462
Diffstat (limited to 'llvm/utils/lit/TestRunner.py')
-rw-r--r--llvm/utils/lit/TestRunner.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/lit/TestRunner.py b/llvm/utils/lit/TestRunner.py
index 7b549ac1c61..34e828bf960 100644
--- a/llvm/utils/lit/TestRunner.py
+++ b/llvm/utils/lit/TestRunner.py
@@ -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)
OpenPOWER on IntegriCloud