From 70df7a287964fd077755f629d31c37276800bafa Mon Sep 17 00:00:00 2001 From: Christian Kern Date: Wed, 29 Oct 2014 09:13:58 +0100 Subject: [PATCH] The bash script before used to determine the path of itself (this is the path with the test binaries). In the /bin/sh script the current path was used instead and the tests failed. Replaced with /bin/sh compatible code, to get the script directory. --- scripts/run_tests_unix.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/run_tests_unix.sh b/scripts/run_tests_unix.sh index 136d1fd..1af6aeb 100755 --- a/scripts/run_tests_unix.sh +++ b/scripts/run_tests_unix.sh @@ -27,12 +27,19 @@ # Needs to be located in the folder containing the tests!! # Is copied automatically there when generating build files with cmake. -DIR=. +SCRIPT_LOCATION="$0" + +# case we have symlinks... +while [ -h "$SCRIPT_LOCATION" ] ; do + SCRIPT_LOCATION=`readlink "$SCRIPT_LOCATION"` +done + +DIR=`dirname "$SCRIPT_LOCATION"` TESTS="embb_base_c_test embb_base_cpp_test embb_mtapi_c_test \ - embb_mtapi_cpp_test embb_algorithms_cpp_test \ - embb_containers_cpp_test embb_dataflow_cpp_test" + embb_mtapi_cpp_test embb_algorithms_cpp_test \ + embb_containers_cpp_test embb_dataflow_cpp_test" for TEST in $TESTS; do - $DIR/$TEST; + $DIR/$TEST; done -- libgit2 0.26.0