]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: do not fail TEST-02-UNITTESTS if they are all skipped
authorLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 21 Jun 2021 13:15:56 +0000 (14:15 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 21 Jun 2021 18:47:38 +0000 (19:47 +0100)
The return code is initialized to fail if /testok is not found, but
that also covers the case where all tests are skipped.

test/TEST-02-UNITTESTS/test.sh

index 906d7cacd489fca358f9dbc8e6f789e685cbff53..e4964cfca465aeb183046aebf211af888e2d1662 100755 (executable)
@@ -29,6 +29,8 @@ check_result_nspawn() {
         if [[ -s "$workspace/skipped" ]]; then
             echo "=== Skipped test log =="
             cat "$workspace/skipped"
+            # We might have only skipped tests - that should not fail the job
+            ret=0
         fi
         if [[ -s "$workspace/testok" ]]; then
             echo "=== Passed tests ==="
@@ -57,6 +59,8 @@ check_result_qemu() {
         if [[ -s "$initdir/skipped" ]]; then
             echo "=== Skipped test log =="
             cat "$initdir/skipped"
+            # We might have only skipped tests - that should not fail the job
+            ret=0
         fi
         if [[ -s "$initdir/testok" ]]; then
             echo "=== Passed tests ==="