From a57eba1dbcfb528581ed461bdd36478dfdd1bf48 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Mon, 16 Jan 2023 08:12:19 +0100 Subject: [PATCH] run_qemu.sh: output log while test is running with tail -f --- run_qemu.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run_qemu.sh b/run_qemu.sh index d80ba12..7099242 100755 --- a/run_qemu.sh +++ b/run_qemu.sh @@ -11,6 +11,9 @@ cleanup() { rm -f "$tmpdir/debian-$DEFAULT_DIST-overlay.qcow" rm -f "$tmpdir/log" [ -e "$tmpdir" ] && rmdir "$tmpdir" + if [ -n "${TAIL_PID:-}" ]; then + kill "$TAIL_PID" + fi if [ -e shared/output.txt ]; then res="$(cat shared/exitstatus.txt)" if [ "$res" != "0" ]; then @@ -48,6 +51,8 @@ if [ -e shared/output.txt ]; then rm shared/output.txt fi touch shared/output.txt +tail -f shared/output.txt & +TAIL_PID=$! # the path to debian-$DEFAULT_DIST.qcow must be absolute or otherwise qemu will # look for the path relative to debian-$DEFAULT_DIST-overlay.qcow