From 0cbfe677f361cf49b182748f4b71ded13f6bc988 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Tue, 16 Sep 2014 14:05:17 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/8754 Tested-by: Gluster Build System Reviewed-by: Harshavardhana Tested-by: Harshavardhana Reviewed-by: Vijay Bellur --- tests/include.rc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/include.rc') 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" -- cgit