From: Kurt Zeilenga Date: Wed, 22 Oct 2003 07:06:28 +0000 (+0000) Subject: Find scripts by short names (test000, rootdse) X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~520 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6308a45de6d1362520974adfaf095075c002b37f;p=openldap Find scripts by short names (test000, rootdse) --- diff --git a/tests/run.in b/tests/run.in index 8e66fc4585..1491b76bbc 100644 --- a/tests/run.in +++ b/tests/run.in @@ -84,12 +84,19 @@ export BACKEND WAIT KILLSERVERS PRESERVE USERDATA if test $# = 0 ; then echo "$USAGE"; exit 1 fi + +SCRIPTDIR="${SRCDIR}/scripts" SCRIPTNAME="$1" -SCRIPT="${SRCDIR}/scripts/${SCRIPTNAME}" shift -if test ! -x "${SCRIPT}" ; then - echo "run: ${SCRIPT} not found (or not executable)" +if test -x "${SCRIPTDIR}/${SCRIPTNAME}" ; then + SCRIPT="${SCRIPTDIR}/${SCRIPTNAME}" +elif test -x "`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`"; then + SCRIPT="`echo ${SCRIPTDIR}/test*-${SCRIPTNAME}`" +elif test -x "`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`"; then + SCRIPT="`echo ${SCRIPTDIR}/${SCRIPTNAME}-*`" +else + echo "run: ${SCRIPTNAME} not found (or not executable)" exit 1; fi