tests: Don't use tmux update-environment
The semantics of tmux's update-environment option are a bit confusing. It says it means the given variables are copied into the session environment from the source environment, but it's not entirely clear what the "source" environment means. From my experimentation it appeast to be the environment from which the tmux *server* is launched, not the one issuing the 'new-session' command. That makes it pretty much useles, certainly in our case where we have no way of knowing if the user has pre-existing tmux sessions. Instead use the new-session -e option to explicitly pass in the variables we want to propagate. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
5f637a2060
commit
14cbbd602c
1 changed files with 5 additions and 4 deletions
|
@ -544,18 +544,19 @@ pause_continue() {
|
||||||
run_term() {
|
run_term() {
|
||||||
export SHELL="/bin/sh"
|
export SHELL="/bin/sh"
|
||||||
tmux set-option -g default-shell "/bin/sh"
|
tmux set-option -g default-shell "/bin/sh"
|
||||||
tmux set-option -g update-environment "PCAP DEBUG"
|
|
||||||
|
TMUX="tmux new-session -s passt_test -ePCAP=$PCAP -eDEBUG=$DEBUG"
|
||||||
|
|
||||||
if [ ${CI} -eq 1 ]; then
|
if [ ${CI} -eq 1 ]; then
|
||||||
printf '\e[8;50;240t'
|
printf '\e[8;50;240t'
|
||||||
asciinema rec --overwrite ci.uncut -c 'tmux new-session -s passt_test ./ci from_term'
|
asciinema rec --overwrite ci.uncut -c "$TMUX ./ci from_term"
|
||||||
video_postprocess ci.uncut
|
video_postprocess ci.uncut
|
||||||
elif [ ${DEMO} -eq 1 ]; then
|
elif [ ${DEMO} -eq 1 ]; then
|
||||||
printf '\e[8;40;130t'
|
printf '\e[8;40;130t'
|
||||||
asciinema rec --overwrite demo.uncut -c 'tmux new-session -s passt_test ./run_demo from_term'
|
asciinema rec --overwrite demo.uncut -c "$TMUX ./run_demo from_term"
|
||||||
video_postprocess demo.uncut
|
video_postprocess demo.uncut
|
||||||
else
|
else
|
||||||
tmux new-session -s passt_test ./run from_term
|
$TMUX ./run from_term
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue