diff options
author | Explorer09 <explorer09@gmail.com> | 2017-01-02 09:03:12 +0800 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2017-01-17 21:10:16 -0500 |
commit | bcf7a07369f3d407378c3980f5411459f07a111f (patch) | |
tree | 3f45bbd6f41abd8b65533bc0266759741866fb87 /tests/testwrapper-direct.sh | |
parent | 8c8691c3fdb327eb45d5ee831da62e7433563004 (diff) | |
download | flex-git-bcf7a07369f3d407378c3980f5411459f07a111f.tar.gz |
test: Remove test scripts bashisms.
They now all work under a POSIX compliant sh. Specifically, 'dash' can
now be used for running "make check" tests.
Note that none of these scripts has ever been using a pipe, so
`set -o pipefail` is unnecessary and removed.
Diffstat (limited to 'tests/testwrapper-direct.sh')
-rwxr-xr-x | tests/testwrapper-direct.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/testwrapper-direct.sh b/tests/testwrapper-direct.sh index e0e7fd9..589ad33 100755 --- a/tests/testwrapper-direct.sh +++ b/tests/testwrapper-direct.sh @@ -1,17 +1,20 @@ -#!/bin/bash -vx -set -euo pipefail +#!/bin/sh +set -vx +set -euvx -# testwrapper-direct.sh: run some specialized flex tests that care where they're run from. +# 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 ;; + b) BINARY_DIR=$OPTARG ;; s) SOURCE_DIR=$OPTARG ;; esac done -TESTNAME="${!OPTIND}" +shift $(($OPTIND-1)) +TESTNAME=$1 -INPUT_NAME=`basename ${TESTNAME%.exe}`.txt +INPUT_NAME=`basename "${TESTNAME%.exe}"`.txt cd ${SOURCE_DIR} && ${BINARY_DIR}/${TESTNAME} ${INPUT_NAME} |