From 33ea0bcb90b3c2cbceaec3117163bcd7b4b817d9 Mon Sep 17 00:00:00 2001 From: Adrian Likins Date: Mon, 4 Feb 2008 18:59:23 -0500 Subject: add in a bit of a kluge to try to make the test-it.sh script a bit more robust. Some magic to try to figure out where the script is running from and adjust paths accordiningly --- test/test-it.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test-it.sh b/test/test-it.sh index 28c16e8..719415b 100755 --- a/test/test-it.sh +++ b/test/test-it.sh @@ -84,7 +84,7 @@ copy_code_to_buildroot() msg "Copying current build dir to $BUILD_PATH" rm -rf $BUILD_PATH mkdir -p $BUILD_PATH/func/ - cp -var ../* $BUILD_PATH/func + cp -var $BASE_DIR/ $BUILD_PATH } @@ -258,6 +258,21 @@ run_unittests() # start doing stuff +# this is really ugly, but we are doing lots of weird path +# stuff at various points and kind of just want to make this +# "just work"... + +if [ -f "func.spec" ] ; then + # we are running from the top level dir + BASE_DIR=`pwd` +elif [ -f "test-it.sh" ] ; then + BASE_DIR="`pwd`/../" +else + echo "You need to run this from the base func dir or the test/ dir" + exit 1 +fi + + show_config -- cgit