Check for missing args and envvars in run-tests.sh

Fixes #71.
This commit is contained in:
Petri Lehtinen 2012-04-26 08:58:31 +03:00
parent ff6e6ee293
commit 42bc7a3c50

View File

@ -3,6 +3,18 @@
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
die() {
echo "$1" >&2
exit 1
}
[ -n "$1" ] || die "Usage: $0 suite-name"
[ -n "$bindir" ] || die "Set bindir"
[ -n "$logdir" ] || die "Set logdir"
[ -n "$scriptdir" ] || die "Set scriptdir"
[ -n "$suites_srcdir" ] || die "Set suites_srcdir"
[ -n "$suites_builddir" ] || die "Set suites_builddir"
json_process=$bindir/json_process
suite_name=$1
@ -10,7 +22,6 @@ suite_srcdir=$suites_srcdir/$suite_name
suite_builddir=$suites_builddir/$suite_name
suite_log=$logdir/$suite_name
[ -z "$VERBOSE" ] && VERBOSE=0
[ -z "$STOP" ] && STOP=0