1313
1414SOURCE_DIR=${SOURCE_DIR:- $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && dirname $( pwd ) )}
1515BUILD_DIR=$( pwd)
16+ BUILD_PATH=${BUILD_PATH:= $PATH }
17+ CTEST=$( which ctest)
1618TMPDIR=${TMPDIR:-/ tmp}
1719USER=${USER:- $(whoami)}
1820
@@ -75,7 +77,11 @@ run_test() {
7577
7678 RETURN_CODE=0
7779
78- CLAR_SUMMARY=" ${BUILD_DIR} /results_${1} .xml" ctest -V -R " ^${1} $" || RETURN_CODE=$? && true
80+ (
81+ export PATH=" ${BUILD_PATH} "
82+ export CLAR_SUMMARY=" ${BUILD_DIR} /results_${1} .xml"
83+ " ${CTEST} " -V -R " ^${1} $"
84+ ) || RETURN_CODE=$? && true
7985
8086 if [ " $RETURN_CODE " -eq 0 ]; then
8187 FAILED=0
@@ -96,9 +102,21 @@ run_test() {
96102 fi
97103}
98104
105+ indent () { sed " s/^/ /" ; }
106+
107+ if [[ " $( uname -s) " == MINGW* ]]; then
108+ BUILD_PATH=$( cygpath " $BUILD_PATH " )
109+ fi
110+
111+
99112# Configure the test environment; run them early so that we're certain
100113# that they're started by the time we need them.
101114
115+ echo " CTest version:"
116+ env PATH=" ${BUILD_PATH} " " ${CTEST} " --version | head -1 2>&1 | indent
117+
118+ echo " "
119+
102120echo " ##############################################################################"
103121echo " ## Configuring test environment"
104122echo " ##############################################################################"
@@ -386,7 +404,7 @@ if [ -z "$SKIP_FUZZERS" ]; then
386404 echo " ## Running fuzzers"
387405 echo " ##############################################################################"
388406
389- ctest -V -R ' fuzzer'
407+ env PATH= " ${BUILD_PATH} " " ${CTEST} " -V -R ' fuzzer'
390408fi
391409
392410cleanup
0 commit comments