tools/run-nm-test.sh: add -d option to set NMTST_DEBUG=d

For convenience, by passing "-d" to tools/run-nm-test.sh,
we set NMTST_DEBUG=d (if $NMTST_DEBUG is unset previously).
This commit is contained in:
Thomas Haller 2018-04-05 14:10:41 +02:00
parent 7a063a91c7
commit 4116fa1044

View file

@ -121,6 +121,10 @@ else
NMTST_USE_VALGRIND=0
shift;
;;
"-d")
NMTST_SET_DEBUG=1
shift;
;;
"--test"|-t)
shift
TEST="$1"
@ -146,6 +150,10 @@ else
fi
if [ "$NMTST_SET_DEBUG" == 1 -a -z "${NMTST_DEBUG+x}" ]; then
export NMTST_DEBUG=d
fi
if _is_true "$NMTST_MAKE_FIRST" 0; then
git_dir="$(readlink -f "$(git rev-parse --show-toplevel)")"
rel_path="$(realpath --relative-to="$git_dir" -m "$TEST" 2>/dev/null)" || die "cannot resolve test-name \"$TEST\". Did you call the script properly?"