summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-06-21 14:15:56 +0100
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-06-21 19:47:38 +0100
commit1d5574516f71c730f4a6618294a3949d2ca4cd3e (patch)
tree11f8f92a89e6824ddb67faa5f2fec311e941aab4 /test
parent7d3f9bf4935d090915131584498212bc120f1d8b (diff)
downloadsystemd-1d5574516f71c730f4a6618294a3949d2ca4cd3e.tar.gz
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.
Diffstat (limited to 'test')
-rwxr-xr-xtest/TEST-02-UNITTESTS/test.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/TEST-02-UNITTESTS/test.sh b/test/TEST-02-UNITTESTS/test.sh
index 906d7cacd4..e4964cfca4 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 ==="