From: Zbigniew Jędrzejewski-Szmek Date: Fri, 20 Mar 2020 16:16:30 +0000 (+0100) Subject: test: echo a message when the tests fails X-Git-Tag: v246-rc1~682^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b74a3061972d5d4cecfb93c1185aebfba72acb52;p=thirdparty%2Fsystemd.git test: echo a message when the tests fails Sometimes it is not clear from the preceding output that there was a failure. --- diff --git a/test/test-functions b/test/test-functions index 7ae7d74fa8c..7c3e074c333 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