From 6308a45de6d1362520974adfaf095075c002b37f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 22 Oct 2003 07:06:28 +0000 Subject: [PATCH] Find scripts by short names (test000, rootdse) --- tests/run.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 -- 2.39.5