aboutgitcodebugslistschat
path: root/test/lib/layout
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-12 20:56:18 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-13 05:32:00 +0200
commitd9b9c252cd494e23056c3ec28080a88636409865 (patch)
tree25dc4a841effae0ad504b13e54d2625e567b597f /test/lib/layout
parentc2f248588b271f083c81f260c0818781e74e3c2d (diff)
downloadpasst-d9b9c252cd494e23056c3ec28080a88636409865.tar
passt-d9b9c252cd494e23056c3ec28080a88636409865.tar.gz
passt-d9b9c252cd494e23056c3ec28080a88636409865.tar.bz2
passt-d9b9c252cd494e23056c3ec28080a88636409865.tar.lz
passt-d9b9c252cd494e23056c3ec28080a88636409865.tar.xz
passt-d9b9c252cd494e23056c3ec28080a88636409865.tar.zst
passt-d9b9c252cd494e23056c3ec28080a88636409865.zip
test: Issue host commands via context for most tests
Convert most of the tests to use the new-style system for issuing commands for all host commands. We leave the distro tests for now: they use the same pane for both host and guest commands which we'll need some more things to deal with. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/lib/layout')
-rw-r--r--test/lib/layout20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/lib/layout b/test/lib/layout
index 2d6b197..09c213a 100644
--- a/test/lib/layout
+++ b/test/lib/layout
@@ -31,8 +31,12 @@ layout_host() {
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
- tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
- tmux select-pane -t ${PANE_HOST} -T "host"
+ if context_exists host; then
+ pane_watch_contexts 0 host host
+ else
+ tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
+ tmux select-pane -t ${PANE_HOST} -T "host"
+ fi
info_layout "host commands only"
@@ -64,8 +68,7 @@ layout_pasta() {
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
- tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
- tmux select-pane -t ${PANE_HOST} -T "host"
+ pane_watch_contexts ${PANE_HOST} host host
tmux pipe-pane -O -t ${PANE_PASST} "cat >> ${LOGDIR}/pane_passt.log"
tmux select-pane -t ${PANE_PASST} -T "pasta"
@@ -100,8 +103,7 @@ layout_passt() {
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
- tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
- tmux select-pane -t ${PANE_HOST} -T "host"
+ pane_watch_contexts ${PANE_HOST} host host
tmux pipe-pane -O -t ${PANE_PASST} "cat >> ${LOGDIR}/pane_passt.log"
tmux select-pane -t ${PANE_PASST} -T "passt"
@@ -141,8 +143,7 @@ layout_passt_in_pasta() {
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
- tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
- tmux select-pane -t ${PANE_HOST} -T "host"
+ pane_watch_contexts ${PANE_HOST} host host
tmux pipe-pane -O -t ${PANE_PASST} "cat >> ${LOGDIR}/pane_passt.log"
tmux select-pane -t ${PANE_PASST} -T "passt in pasta (namespace)"
@@ -189,8 +190,7 @@ layout_two_guests() {
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
- tmux pipe-pane -O -t ${PANE_HOST} "cat >> ${LOGDIR}/pane_host.log"
- tmux select-pane -t ${PANE_HOST} -T "host"
+ pane_watch_contexts ${PANE_HOST} host host
tmux pipe-pane -O -t ${PANE_PASST_1} "cat >> ${LOGDIR}/pane_passt_1.log"
tmux select-pane -t ${PANE_PASST_1} -T "passt #1 in namespace #1"