summaryrefslogtreecommitdiff
path: root/tests/testwrapper.sh
diff options
context:
space:
mode:
authorWill Estes <westes575@gmail.com>2014-06-01 15:09:29 -0400
committerWill Estes <westes575@gmail.com>2014-11-12 05:14:26 -0500
commitfddc982e9f447f22248397f9e94e76c93e1d723f (patch)
treec29c768ba00cb44f88c9fbeeef03dd44ceb0d914 /tests/testwrapper.sh
parent4cf8cc78007a5f11ada457e0ad0facd2551b26d4 (diff)
make tests/testwrapper.sh more verbose; find input in srcdir
Since output is redirected by the automake parallel test suite driver, turn on both -v and -x in bash for the testwrapper.sh shell script. This helps a ton in debugging problems with the test harness itself. In general, the input files are in automake's srcdir and the name of the test includes the relative path to it (even though that's supposed to be ./). Therefore, pass srcdir in AM_LOG_FLAGS and prepend that to the test name as part of constructing the input file's name.
Diffstat (limited to 'tests/testwrapper.sh')
-rwxr-xr-xtests/testwrapper.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/testwrapper.sh b/tests/testwrapper.sh
index f35f8ed..7194e6d 100755
--- a/tests/testwrapper.sh
+++ b/tests/testwrapper.sh
@@ -1,11 +1,11 @@
-#!/bin/bash
+#!/bin/bash -vx
# testwrapper.sh: run a flex test, typically called by a Makefile
# Each test will exercise some feature or aspect of flex. Run the test with any input it may need.
-INPUTFILE=/dev/null
-
-TESTNAME="$1"
-
+SRCDIR="$1"
+TESTNAME="$2"
+INPUTNAME=`basename $TESTNAME`.txt
+$TESTNAME < $SRCDIR/$INPUTNAME