diff --git a/Scripts/developer_scripts/autotest_cgal_with_cmake b/Scripts/developer_scripts/autotest_cgal_with_cmake index e05eb6e747c..7099d98f13e 100755 --- a/Scripts/developer_scripts/autotest_cgal_with_cmake +++ b/Scripts/developer_scripts/autotest_cgal_with_cmake @@ -858,9 +858,6 @@ else MAKE_CMD='make' fi -# that line makes the script remove the lock file in case of unwanted exit -trap "rm -f $LOCK_FILE" EXIT HUP INT TERM - # Acquire lock lockfile -r 5 "$LOCK_FILE"; if [ ${?} != 0 ]; then @@ -868,6 +865,9 @@ if [ ${?} != 0 ]; then exit 1; fi +# that line makes the script remove the lock file in case of unwanted exit +trap "rm -f $LOCK_FILE" EXIT HUP INT TERM + # Notify test started if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then for i in ${MAIL_ADDRESS}; do