summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-04 18:59:23 -0500
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2008-02-04 18:59:23 -0500
commit33ea0bcb90b3c2cbceaec3117163bcd7b4b817d9 (patch)
treecbcdd9b01291bd7a75cec5e37c631662dd829d8b /test
parent52145432cc3608875a973aa078c19c869c8404d4 (diff)
downloadfunc-33ea0bcb90b3c2cbceaec3117163bcd7b4b817d9.tar.gz
func-33ea0bcb90b3c2cbceaec3117163bcd7b4b817d9.tar.xz
func-33ea0bcb90b3c2cbceaec3117163bcd7b4b817d9.zip
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
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-it.sh17
1 files changed, 16 insertions, 1 deletions
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