diff --git a/Scripts/developer_scripts/create_cgal_test b/Scripts/developer_scripts/create_cgal_test index 48296e17658..6b1c7e19ded 100755 --- a/Scripts/developer_scripts/create_cgal_test +++ b/Scripts/developer_scripts/create_cgal_test @@ -97,6 +97,22 @@ cat << EOF compile_and_run() { + + if [ -z "\${CGAL_DATA_DIR}" ]; then + if [ -d ../../data ]; then + CGAL_DATA_DIR=../../data + else + if [ -d ../../../Data/data ]; then + CGAL_DATA_DIR=../../../Data/data + else + echo "ERROR: Cannot run test script, please set the variable CGAL_DATA_DIR" + exit 1 + fi + fi + fi + + echo "Runs will be using CGAL_DATA_DIR = \${CGAL_DATA_DIR}" + echo "Compiling \$1 ... " SUCCESS="y" @@ -113,7 +129,7 @@ compile_and_run() rm -f \$OUTPUTFILE COMMAND="./\$1" if [ -f \$1.cmd ] ; then - COMMAND="\$COMMAND \`cat \$1.cmd\`" + COMMAND="\$COMMAND \`envsubst < \$1.cmd\`" fi if [ -f \$1.cin ] ; then COMMAND="cat \$1.cin | \$COMMAND"