Merge pull request #6062 from lrineau/Scripts_autotest_cgal_with_ctest__robust_to_errexit-GF

autotest_cgal_with_ctest: Fix to allow the `errexit` option (`bash -e`)
This commit is contained in:
Sebastien Loriot 2021-10-18 17:07:19 +02:00 committed by GitHub
commit 57ddb8f4c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -97,8 +97,10 @@ download_latest()
fi fi
log "${ACTUAL_LOGFILE}" "getting LATEST" log "${ACTUAL_LOGFILE}" "getting LATEST"
if [ -n "${USE_CURL}" ]; then if [ -n "${USE_CURL}" ]; then
echo "using curl..."
${CURL} ${CURL_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 ${CURL} ${CURL_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
else else
echo "using wget..."
${WGET} ${WGET_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 ${WGET} ${WGET_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1
fi fi
if [ ! -f "LATEST" ]; then if [ ! -f "LATEST" ]; then
@ -114,8 +116,7 @@ download_latest()
abort_if_latest_already_tested() abort_if_latest_already_tested()
{ {
if [ -r "RELEASE_NR" ]; then if [ -r "RELEASE_NR" ]; then
cmp LATEST RELEASE_NR >> "${ACTUAL_LOGFILE}" if cmp LATEST RELEASE_NR >> "${ACTUAL_LOGFILE}"; then
if [ ! ${?} != 0 ]; then
log "${ACTUAL_LOGFILE}" "This release has already been tested." log "${ACTUAL_LOGFILE}" "This release has already been tested."
rm -f "$LOCK_FILE"; rm -f "$LOCK_FILE";
exit 1; exit 1;