summaryrefslogtreecommitdiff
path: root/tests/testwrapper-direct.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testwrapper-direct.sh')
-rwxr-xr-xtests/testwrapper-direct.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/testwrapper-direct.sh b/tests/testwrapper-direct.sh
new file mode 100755
index 0000000..589ad33
--- /dev/null
+++ b/tests/testwrapper-direct.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -vx
+set -euvx
+
+# testwrapper-direct.sh: run some specialized flex tests that care where
+# they're run from.
+
+while getopts :b:s: OPTION ; do
+ case $OPTION in
+ b) BINARY_DIR=$OPTARG ;;
+ s) SOURCE_DIR=$OPTARG ;;
+ esac
+ done
+
+shift $(($OPTIND-1))
+TESTNAME=$1
+
+INPUT_NAME=`basename "${TESTNAME%.exe}"`.txt
+
+cd ${SOURCE_DIR} && ${BINARY_DIR}/${TESTNAME} ${INPUT_NAME}