Fix potential nil ptr seg fault and CI test issue
[ric-plt/lib/rmr.git] / test / run_app_tests.sh
similarity index 74%
rename from test/run_app_tests
rename to test/run_app_tests.sh
index 21064d9..3df47e2 100644 (file)
 # To deal with this, all leading positional parms of the form foo=bar are
 # looked at and if we like it we'll export it before starting the test.
 
+# It is also impossible for us to know what the build directory the user
+# created for their build and test. We will auto discover if they used
+# .build or build in the parent to this directory (in that order). If a
+# different directory is desired, then the build directory must be supplied
+# as an environment variable to the make:
+#      cd rmr/.bld
+#      BUILD_PATH=$PWD make test ARGS=-v
+
 while [[ $1 == *"="* ]]
 do
        case ${1%%=*} in
+               CMBUILD)                                                # should be cmake build dir
+                       if [[ -z $BUILD_PATH ]]         # still allow user to override
+                       then
+                               export BUILD_PATH=${1##*=}
+                       fi
+                       ;;
+
                LD_LIBRARY_PATH)
                        export LD_LIBRARY_PATH=${1##*=}
                        ;;
@@ -51,4 +66,4 @@ done
 
 set -e
 cd app_test
-bash ./run_all.ksh -S  # build CI likely doesn't have ksh; Run SI tests
+bash ./run_all.sh  -S  # build CI likely doesn't have ksh; Run SI tests