catch `make all` failing

parent bad1d206
......@@ -95,18 +95,22 @@ ${DUNECONTROL} --current "${@}" configure
# We also have to pass "-k" to make to have it keep going as much as possible
# This won't work for ninja, which required "-k 0"
set +e
${DUNECONTROL} --current "${@}" make -k ${parallel_opts} all
build_failed=
${DUNECONTROL} --current "${@}" make -k ${parallel_opts} all || build_failed=1
if [[ "${DUNECI_TEST_INSTALL:-0}" != 0 ]] ; then
${DUNECONTROL} --current "${@}" make -k ${parallel_opts} install
install_result=$?
export DUNECI_INSTALL_RESULT=${install_result}
fi
${DUNECONTROL} --current "${@}" make -k ${parallel_opts} "${build_test_targets[@]}"
${DUNECONTROL} --current "${@}" make -k ${parallel_opts} "${build_test_targets[@]}" || build_failed=1
# note the extra quoting for select_test_args to protect it from dunecontrol evaling it
if ${DUNECONTROL} --current "${@}" bexec ${DUNE_CTEST} ${parallel_opts} ${select_test_args[@]:+"${select_test_args[@]@Q}"} ; then
if [[ -v install_result && ${install_result} -ne 0 ]] ; then
echo "Error: The installation test failed"
exit 1
elif [[ -n "${build_failed}" ]]; then
echo >&2 "ERROR: Build failed"
exit 1
else
exit 0
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment