From 42abd8c9f08bb39d9bff03010fc181de50ee0d7b Mon Sep 17 00:00:00 2001
From: "P.-A. Loizeau" <p.-a.loizeau@gsi.de>
Date: Thu, 14 Nov 2024 16:20:29 +0100
Subject: [PATCH] Increase to 15m time reserved for teardown + files copy in
 Slurm weekly tests

---
 scripts/find_slurm_ctest_stop_time.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/find_slurm_ctest_stop_time.sh b/scripts/find_slurm_ctest_stop_time.sh
index fcf534e3b3..1e0056282e 100755
--- a/scripts/find_slurm_ctest_stop_time.sh
+++ b/scripts/find_slurm_ctest_stop_time.sh
@@ -24,7 +24,7 @@ if [[ -n ${SLURM_JOB_END_TIME} ]]; then
   echo "Env variable SLURM_JOB_END_TIME=${SLURM_JOB_END_TIME}"
   SLURM_JOB_END_TIME_DATE=`date -d "@${SLURM_JOB_END_TIME}"`
   echo "SLURM_JOB_END_TIME in human format: ${SLURM_JOB_END_TIME_DATE}"
-  CTEST_END_TIME_LIMIT=`date -d "${SLURM_JOB_END_TIME_DATE} -5minutes" +"%H:%M:%S"`
+  CTEST_END_TIME_LIMIT=`date -d "${SLURM_JOB_END_TIME_DATE} -15minutes" +"%H:%M:%S"`
 else
   # 2. From what squeue return if not possible directly from environment (virgo2)
   # ==> Broken from bare-metal submit nodes end May 2024, maybe bug?
@@ -40,14 +40,14 @@ else
   # https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmCTest.cxx#L3012
   # https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/CTest/cmCTestRunTest.cxx#L811
   # => Does not work for long running tests close to end of the day
-  # CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%Y-%m-%d %H:%M:%S %z"`
+  # CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -15minutes" +"%Y-%m-%d %H:%M:%S %z"`
   # => But following should be ok for weeklies starting early in the morning
   # => Does not work at least with cmake 3.22 and 3.24, seesm that timezone is breaking decoding
   #    (tried all timezone options of date, with and without space between time and timezone)
-  #CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S %z"`
+  #CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -15minutes" +"%H:%M:%S %z"`
   # => Working! but probably unsafe on day of Summer time swaps + if tests run close to midnight...
   # => Fixed for summer time but will probably still fail on the day of the swap itself... so twice a year
-  CTEST_END_TIME_LIMIT=`date -d "${END_TIME}${CET_CEST} -5minutes" +"%H:%M:%S"`
+  CTEST_END_TIME_LIMIT=`date -d "${END_TIME}${CET_CEST} -15minutes" +"%H:%M:%S"`
 fi
 
 echo "Setting the job time limit for ctest to ${CTEST_END_TIME_LIMIT} to make sure CDASH data is uploaded"
-- 
GitLab