From b74a3061972d5d4cecfb93c1185aebfba72acb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 20 Mar 2020 17:16:30 +0100 Subject: [PATCH] test: echo a message when the tests fails Sometimes it is not clear from the preceding output that there was a failure. --- test/test-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test-functions b/test/test-functions index 7ae7d74fa8..7c3e074c33 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1963,21 +1963,21 @@ test_run() { if [ -z "$TEST_NO_QEMU" ]; then if run_qemu "$1"; then - check_result_qemu || return 1 + check_result_qemu || { echo "QEMU test failed"; return 1; } else dwarn "can't run QEMU, skipping" fi fi if [ -z "$TEST_NO_NSPAWN" ]; then if run_nspawn "nspawn-root" "$1"; then - check_result_nspawn "nspawn-root" || return 1 + check_result_nspawn "nspawn-root" || { echo "nspawn-root test failed"; return 1; } else dwarn "can't run systemd-nspawn, skipping" fi if [[ "$RUN_IN_UNPRIVILEGED_CONTAINER" = "yes" ]]; then if NSPAWN_ARGUMENTS="-U --private-network $NSPAWN_ARGUMENTS" run_nspawn "unprivileged-nspawn-root" "$1"; then - check_result_nspawn "unprivileged-nspawn-root" || return 1 + check_result_nspawn "unprivileged-nspawn-root" || { echo "unprivileged-nspawn-root test failed"; return 1; } else dwarn "can't run systemd-nspawn, skipping" fi