]> git.sur5r.net Git - openldap/commitdiff
Find scripts by short names (test000, rootdse)
authorKurt Zeilenga <kurt@openldap.org>
Wed, 22 Oct 2003 07:06:28 +0000 (07:06 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 22 Oct 2003 07:06:28 +0000 (07:06 +0000)
tests/run.in

index 8e66fc45851b0105317bb2807de83533fe21d314..1491b76bbc20023768b312f393fbecc5f8976030 100644 (file)
@@ -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