summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2014-09-16 14:05:17 -0400
committerVijay Bellur <vbellur@redhat.com>2014-09-21 10:30:19 -0700
commit0cbfe677f361cf49b182748f4b71ded13f6bc988 (patch)
tree1e6a84d1a523956dfbbcd73061112194789a6513
parent258e61adb5505124925c71d2a0d0375d086e32d4 (diff)
tests: regression, can't run `prove $t` in subdirs
In various tests we already use the pattern: . $(dirname $0)/../include.rc to locate various .rc files. Use the same pattern we already use to also find the new env.rc Change-Id: I0d438446fa00be2c143b5cf46025866182c94814 BUG: 1142419 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/8754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--tests/include.rc9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/include.rc b/tests/include.rc
index 7b490ea839e..bcaafb90f66 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -9,7 +9,12 @@ B0=${B0:=/d/backends}; # top level of brick directories
CC=cc
OSTYPE=$(uname -s)
-if [ ! -f ${PWD}/tests/env.rc ]; then
+ENV_RC=$(dirname $0)/../env.rc
+if [ ! -f $ENV_RC ]; then
+ ENV_RC=$(dirname $0)/../../env.rc
+fi
+
+if [ ! -f $ENV_RC ]; then
echo "Aborting."
echo
echo "env.rc not found"
@@ -18,7 +23,7 @@ if [ ! -f ${PWD}/tests/env.rc ]; then
echo
exit 1
fi
-. ${PWD}/tests/env.rc
+. $ENV_RC
H0=${H0:=`hostname`}; # hostname
MOUNT_TYPE_FUSE="fuse.glusterfs"