From: Tobias Brunner Date: Fri, 7 Jul 2017 07:23:14 +0000 (+0200) Subject: testing: Support running multiple tests with * as wildcard (e.g. ikev2/ocsp-*) X-Git-Tag: 5.6.0dr1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49917f002829f2d0d9062f69461ac04ab14f1b6e;p=thirdparty%2Fstrongswan.git testing: Support running multiple tests with * as wildcard (e.g. ikev2/ocsp-*) --- diff --git a/testing/do-tests b/testing/do-tests index 60c34c7983..230403b9f7 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -207,12 +207,16 @@ for SUBDIR in $TESTS do SUBTESTS="`basename $SUBDIR`" - if [ $SUBTESTS = $SUBDIR ] - then - SUBTESTS="`ls $DEFAULTTESTSDIR/$SUBDIR`" - else - SUBDIR="`dirname $SUBDIR`" - fi + if [ $SUBTESTS = $SUBDIR ] + then + SUBTESTS="`ls $DEFAULTTESTSDIR/$SUBDIR`" + else + if [[ $SUBTESTS == *'*'* ]] + then + SUBTESTS="`basename -a $DEFAULTTESTSDIR/$SUBDIR`" + fi + SUBDIR="`dirname $SUBDIR`" + fi if [ ! -d $TODAYDIR/$SUBDIR ] then