summaryrefslogtreecommitdiffstats
path: root/test/test-it.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-it.sh')
-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