osmith has uploaded this change for review.

View Change

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(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/15/40315/1
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

To view, visit change 40315. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6de4d1c31385af52ee0fd55378adb10a9e2c2154
Gerrit-Change-Number: 40315
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>