From: Luca Boccassi Date: Mon, 21 Jun 2021 13:15:56 +0000 (+0100) Subject: test: do not fail TEST-02-UNITTESTS if they are all skipped X-Git-Tag: v249-rc2~31^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d5574516f71c730f4a6618294a3949d2ca4cd3e;p=thirdparty%2Fsystemd.git test: do not fail TEST-02-UNITTESTS if they are all skipped The return code is initialized to fail if /testok is not found, but that also covers the case where all tests are skipped. --- diff --git a/test/TEST-02-UNITTESTS/test.sh b/test/TEST-02-UNITTESTS/test.sh index 906d7cacd48..e4964cfca46 100755 --- a/test/TEST-02-UNITTESTS/test.sh +++ b/test/TEST-02-UNITTESTS/test.sh @@ -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 ==="