diff options
author | David Howells <dhowells@redhat.com> | 2014-03-06 15:07:01 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-03-06 15:07:01 +0000 |
commit | 734e6a13b3f2954791c5f4dd5c572524fb87bd29 (patch) | |
tree | f6804ff2fe2b2484a5384c09bd46cee4948fd37a | |
parent | a18c6f7e746fd9003648f9fbef74c5d2e498d6ec (diff) | |
download | keyutils-734e6a13b3f2954791c5f4dd5c572524fb87bd29.tar.gz |
TEST: Make sure the TEST envvar is set
Make sure the TEST envvar is set so that the scripts don't break if it isn't.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | tests/prepare.inc.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/prepare.inc.sh b/tests/prepare.inc.sh index 8abcec2..7b6e3b4 100644 --- a/tests/prepare.inc.sh +++ b/tests/prepare.inc.sh @@ -49,3 +49,22 @@ KEYUTILSVER=`expr "$KEYUTILSVER" : '.*keyutils-\([0-9.]*\).*'` . $includes/version.inc.sh KERNELVER=`uname -r` + +# +# Make sure the TEST envvar is set. +# +if [ -z "$TEST" ] +then + p=`pwd` + case $p in + */keyctl/*) + TEST=keyctl/${p#*/keyctl/} + ;; + */bugzillas/*) + TEST=bugzillas/${p#*/bugzillas/} + ;; + *) + TEST=unknown + ;; + esac +fi |