From 9c1cd66d41d86ac870794a251ffb40e17b931aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 9 Aug 2022 00:49:30 +0200 Subject: [PATCH] tests/kvm/virtme-runner: Add more logging Part-of: --- src/tests/kvm/virtme-run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/kvm/virtme-run.sh b/src/tests/kvm/virtme-run.sh index e41d21c77..a109dafe7 100755 --- a/src/tests/kvm/virtme-run.sh +++ b/src/tests/kvm/virtme-run.sh @@ -36,6 +36,7 @@ SCRIPT="\ $(printf "\"%s\" " "${@:6}")\ " +echo Running tests in virtual machine ... virtme-run \ --memory=256M \ --rw \ @@ -43,8 +44,16 @@ virtme-run \ --kimg "$IMAGE" \ --script-sh "sh -c \"$SCRIPT\"" \ --qemu-opts -cpu host,pdcm=off -smp 2 +VM_RESULT=$? +if [ $VM_RESULT != 0 ]; then + echo Virtual machine exited with a failure: $VM_RESULT +else + echo Virtual machine terminated. +fi TEST_RESULT="$(cat "$TEST_RESULT_FILE")" rm "$TEST_RESULT_FILE" +echo Test result exit status: $TEST_RESULT + exit "$TEST_RESULT"