(testsuite) Supported specifying bash binary
Using option `--tool_exec' you can now specify which bash binary you want to use: $ ./runUnit --tool_exec /opt/bash-4/bin/bash $ ./runCompletion --tool_exec /opt/bash-4/bin/bash If not specified, current `bash' as found in the tcl path (/bin/bash) will be used.
This commit is contained in:
parent
679a87d91b
commit
fc3f65e6dd
@ -8,14 +8,16 @@ proc completion_exit {} {
|
||||
|
||||
|
||||
proc completion_start {} {
|
||||
global TESTDIR spawn_id
|
||||
global TESTDIR TOOL_EXECUTABLE spawn_id
|
||||
set test "completion_start"
|
||||
set TESTDIR [pwd]
|
||||
|
||||
# Start bash and load bash-completion
|
||||
|
||||
exp_spawn bash --rcfile config/bashrc
|
||||
assert_bash_exec {} "bash --rcfile config/bashrc"
|
||||
# If `--tool_exec' option not specified, use "bash"
|
||||
if {! [info exists TOOL_EXECUTABLE]} {set TOOL_EXECUTABLE bash}
|
||||
exp_spawn $TOOL_EXECUTABLE --rcfile config/bashrc
|
||||
assert_bash_exec {} "$TOOL_EXECUTABLE --rcfile config/bashrc"
|
||||
assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
|
||||
assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
|
||||
assert_bash_exec {source $BASH_COMPLETION}
|
||||
|
@ -8,14 +8,16 @@ proc unit_exit {} {
|
||||
|
||||
|
||||
proc unit_start {} {
|
||||
global TESTDIR spawn_id
|
||||
global TESTDIR TOOL_EXECUTABLE spawn_id
|
||||
set test "unit_start"
|
||||
set TESTDIR [pwd]
|
||||
|
||||
# Start bash and load bash-completion
|
||||
|
||||
exp_spawn bash --rcfile config/bashrc
|
||||
assert_bash_exec {} "bash --rcfile config/bashrc"
|
||||
# If `--tool_exec' option not specified, use "bash"
|
||||
if {! [info exists TOOL_EXECUTABLE]} {set TOOL_EXECUTABLE bash}
|
||||
exp_spawn $TOOL_EXECUTABLE --rcfile config/bashrc
|
||||
assert_bash_exec {} "$TOOL_EXECUTABLE --rcfile config/bashrc"
|
||||
assert_bash_exec {BASH_COMPLETION_DIR=$(cd ..; pwd)/contrib}
|
||||
assert_bash_exec {BASH_COMPLETION=$(cd ..; pwd)/bash_completion}
|
||||
# Bash < 3.2.41 has a bug where 'history' disappears from SHELLOPTS
|
||||
|
Loading…
x
Reference in New Issue
Block a user