xref: /netbsd-src/external/bsd/flex/dist/tests/testwrapper-direct.sh (revision 463ae347b383ca644b1399e7e5228310d0bdf969)
1*463ae347Schristos#!/bin/sh
2*463ae347Schristosset -vx
3*463ae347Schristosset -euvx
456bd8546Schristos
5*463ae347Schristos# testwrapper-direct.sh: run some specialized flex tests that care where
6*463ae347Schristos# they're run from.
756bd8546Schristos
856bd8546Schristoswhile getopts :b:s: OPTION ; do
956bd8546Schristos    case $OPTION in
1056bd8546Schristos        b) BINARY_DIR=$OPTARG ;;
1156bd8546Schristos        s) SOURCE_DIR=$OPTARG ;;
1256bd8546Schristos    esac
1356bd8546Schristos    done
1456bd8546Schristos
15*463ae347Schristosshift $(($OPTIND-1))
16*463ae347SchristosTESTNAME=$1
1756bd8546Schristos
18*463ae347SchristosINPUT_NAME=`basename "${TESTNAME%.exe}"`.txt
1956bd8546Schristos
2056bd8546Schristoscd ${SOURCE_DIR} && ${BINARY_DIR}/${TESTNAME} ${INPUT_NAME}
21