]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Skip tests with missing files, don't abort the test run
authorTobias Brunner <tobias@strongswan.org>
Tue, 23 Jun 2020 14:24:18 +0000 (16:24 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 23 Jun 2020 14:24:18 +0000 (16:24 +0200)
This allows simple test configs in testing/tests/local that are no
actual test cases.

testing/do-tests

index fad3af8cd57d49c1de9d8a44613bd76a657014b7..cc65e6b2ca932a9240aba3981b8c81620f105ed2 100755 (executable)
@@ -313,11 +313,11 @@ do
            continue
        fi
 
-       [ -f $DEFAULTTESTSDIR/${testname}/description.txt ] || die "!! File 'description.txt' is missing"
-       [ -f $DEFAULTTESTSDIR/${testname}/test.conf ]       || die "!! File 'test.conf' is missing"
-       [ -f $DEFAULTTESTSDIR/${testname}/pretest.dat ]     || die "!! File 'pretest.dat' is missing"
-       [ -f $DEFAULTTESTSDIR/${testname}/posttest.dat ]    || die "!! File 'posttest.dat' is missing"
-       [ -f $DEFAULTTESTSDIR/${testname}/evaltest.dat ]    || die "!! File 'evaltest.dat' is missing"
+       [ ! -f $DEFAULTTESTSDIR/${testname}/description.txt ] && echo "!! File 'description.txt' is missing" && continue
+       [ ! -f $DEFAULTTESTSDIR/${testname}/test.conf ]       && echo "!! File 'test.conf' is missing" && continue
+       [ ! -f $DEFAULTTESTSDIR/${testname}/pretest.dat ]     && echo "!! File 'pretest.dat' is missing" && continue
+       [ ! -f $DEFAULTTESTSDIR/${testname}/posttest.dat ]    && echo "!! File 'posttest.dat' is missing" && continue
+       [ ! -f $DEFAULTTESTSDIR/${testname}/evaltest.dat ]    && echo "!! File 'evaltest.dat' is missing" && continue
 
        TESTRESULTDIR=$TODAYDIR/$testname
        mkdir -p $TESTRESULTDIR