diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-19 03:54:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-19 03:54:21 +0000 |
commit | 7723d45153c5610349486121e2b50b5ba60b2f5c (patch) | |
tree | cf5aa935752941aa862efcd43714bdffec2746b7 /utils/lit/TestRunner.py | |
parent | 8b828a84a0265254b49d97e6c150c42899b397a9 (diff) |
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
Diffstat (limited to 'utils/lit/TestRunner.py')
-rw-r--r-- | utils/lit/TestRunner.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/lit/TestRunner.py b/utils/lit/TestRunner.py index 7b549ac1c6..34e828bf96 100644 --- a/utils/lit/TestRunner.py +++ b/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) |