]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: echo a message when the tests fails
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Mar 2020 16:16:30 +0000 (17:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:51:29 +0000 (11:51 +0100)
Sometimes it is not clear from the preceding output that there was a
failure.

test/test-functions

index 7ae7d74fa8c155acf2a571dc5ba27ae5e62011aa..7c3e074c333be4d95fe0d46a2eb8def826704dbf 100644 (file)
@@ -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