Skip to content

Commit 5a5c28b

Browse files
committed
Actually run ctest for install.sh tests
1 parent 32a4a97 commit 5a5c28b

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

developer-scripts/travis/test-script.InstallScript.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,25 @@ trap '__caf_err_report "${FUNCNAME:-.}" ${LINENO}' ERR
2323
echo "Performing Travis-CI script phase for the OpenCoarrays installation script..."
2424

2525
./install.sh --yes-to-all -i "${HOME}/opencoarrays" -j 4 -f "$(type -P "${FC}")" -c "$(type -P "${CC}")" -C "$(type -P "${CXX}")"
26-
CTEST_LOC=(prerequisites/installations/cmake/*/bin/ctest)
27-
INSTALLER_CTEST="${CTEST_LOC[${#CTEST_LOC[@]}-1]}"
28-
if [[ -x "${INSTALLER_CTEST}" ]] ;then
29-
"${INSTALLER_CTEST}" --output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}"
26+
BUILD_LOC=(prerequisites/builds/opencoarrays/*/)
27+
BUILD_LOC_DIR="${BUILD_LOC[${#BUILD_LOC[@]}]-1}"
28+
if [[ -d "${BUILD_LOC_DIR}" ]]; then
29+
echo "Found opencoarrays build directory created by the install script:"
30+
echo " ${BUILD_LOC_DIR}"
31+
(
32+
cd "${BUILD_LOC}"
33+
CTEST_LOC=(../../../installations/cmake/*/bin/ctest)
34+
INSTALLER_CTEST="${CTEST_LOC[${#CTEST_LOC[@]}-1]}"
35+
if [[ -x "${INSTALLER_CTEST}" ]] ;then
36+
"${INSTALLER_CTEST}" --output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}"
37+
else
38+
ctest --output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}"
39+
fi
40+
)
3041
else
31-
ctest --output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}"
42+
echo "Failed to find install.sh build directory. Contents of prerequisites/builds is:"
43+
ls prerequisites/builds/*/
44+
exit 5
3245
fi
3346

3447
echo "Done."

developer-scripts/travis/test-script.cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ trap '__caf_err_report "${FUNCNAME:-.}" ${LINENO}' ERR
2222

2323
echo "Performing Travis-CI script phase for the OpenCoarrays direct cmake build..."
2424

25-
mkdir cmake-build || echo "Cannot mkdir cmake-build"
25+
mkdir cmake-build
2626
# shellcheck disable=SC2153
2727
for BUILD_TYPE in ${BUILD_TYPES}; do
2828
rm -rf cmake-build/* || true

0 commit comments

Comments
 (0)