Add --keep-tmp flag to test script
This commit is contained in:
parent
0b486d5d27
commit
ae70278a9f
@ -4,19 +4,24 @@ REGEXS=()
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-v|--verbose)
|
||||
VERBOSE=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
cat <<EOF
|
||||
USAGE: [flags] [test regexs...]
|
||||
FLAGS
|
||||
--keep-tmp
|
||||
--verbose (-v)
|
||||
--help (-h)
|
||||
EOF
|
||||
exit 1
|
||||
;;
|
||||
-v|--verbose)
|
||||
VERBOSE=1
|
||||
shift
|
||||
;;
|
||||
--keep-tmp)
|
||||
KEEP_TMP=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
REGEXS+=("$1")
|
||||
shift
|
||||
@ -29,7 +34,7 @@ cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null
|
||||
root=$(pwd)
|
||||
|
||||
TMPDIR="$(mktemp --tmpdir -d isle-tests.XXXXXX)"
|
||||
trap 'rm -rf $TMPDIR' EXIT
|
||||
if [ -z "$KEEP_TMP" ]; then trap 'rm -rf $TMPDIR' EXIT; fi
|
||||
|
||||
export TMPDIR
|
||||
echo "tmp dir is $TMPDIR"
|
||||
|
Loading…
Reference in New Issue
Block a user