osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40315?usp=email )
Change subject: testenv: qemu: initrd build fail: stop immediately ......................................................................
testenv: qemu: initrd build fail: stop immediately
Let qemu_wait.sh fail immediately when building the initrd has failed, instead of waiting until it runs into a timeout.
Change-Id: I6de4d1c31385af52ee0fd55378adb10a9e2c2154 --- M _testenv/data/scripts/qemu/qemu_functions.sh M _testenv/data/scripts/qemu/qemu_wait.sh 2 files changed, 7 insertions(+), 0 deletions(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve
diff --git a/_testenv/data/scripts/qemu/qemu_functions.sh b/_testenv/data/scripts/qemu/qemu_functions.sh index 46e7273..a984ff9 100755 --- a/_testenv/data/scripts/qemu/qemu_functions.sh +++ b/_testenv/data/scripts/qemu/qemu_functions.sh @@ -146,6 +146,7 @@ echo echo "ERROR: failed to build the initrd!" echo + touch build_initrd_failed exit 1 }
diff --git a/_testenv/data/scripts/qemu/qemu_wait.sh b/_testenv/data/scripts/qemu/qemu_wait.sh index fb45c7e..2d42701 100755 --- a/_testenv/data/scripts/qemu/qemu_wait.sh +++ b/_testenv/data/scripts/qemu/qemu_wait.sh @@ -8,6 +8,12 @@ i=0 for i in $(seq 1 600); do sleep 0.1 + + # Check for the marker from qemu_initrd_exit_error + if [ -e build_initrd_failed ]; then + exit 1 + fi + if grep -q KERNEL_TEST_VM_IS_READY "$LOGFILE"; then # Wait some more for SUT to become ready sleep 1