Skip to content

Commit 65ca0ef

Browse files
committed
Fix macOS CI error
1 parent 9b2409e commit 65ca0ef

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ for version in ${GCC}; do
2929
if [[ ${OSTYPE} == [Dd]arwin* ]]; then
3030
# Use clang on macOS because that's what homebrew and everyone else does
3131
export CC=clang
32+
brew unlink openmpi || true
33+
brew unlink mpich || true
3234
for mpi in "mpich" "open-mpi"; do
3335
brew unlink "${mpi}" || true
3436
brew ls --versions "${mpi}" >/dev/null || brew install "${mpi}"
3537
brew outdated "${mpi}" || brew upgrade "${mpi}"
36-
brew unlink "${mpi}"
38+
brew unlink "${mpi}" || true
3739
done
3840
brew link open-mpi
3941
fi
@@ -50,7 +52,12 @@ for version in ${GCC}; do
5052
cd "${BLD_DIR}"
5153
cmake -DCMAKE_INSTALL_PREFIX:PATH="${HOME}/OpenCoarrays" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ..
5254
make -j 4
53-
ctest --output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}" --timeout "${TEST_TIMEOUT:-200}"
55+
CTEST_FLAGS=(--output-on-failure --schedule-random --repeat-until-fail "${NREPEAT:-5}" --timeout "${TEST_TIMEOUT:-200}")
56+
if [[ "${BUILD_TYPE}" =~ Deb ]]; then
57+
ctest "${CTEST_FLAGS[@]}" > "${BUILD_TYPE}.log" || cat "${BUILD_TYPE}.log"
58+
else
59+
ctest "${CTEST_FLAGS[@]}"
60+
fi
5461
make install
5562
make uninstall
5663
)

0 commit comments

Comments
 (0)