[CI] Add detection of job timeout and total test time TO check to CI
Two features:
- Add a script to create a ctest absolute time limit based on the GITLAB job timeout with a bit less than 5 minutes margin (depending on when in the job the script is executed)
- Add another script allowing to set an absolute limit in second for the total time of the test stage of the build, also relying in the ctest
stop time
. In case the above script is also used the earliest of the two times is used
=> Both scripts rely on the already existing infrastructure added to handle the limited duration of the SLURM jobs for the weekly builds on Virgo.
=> The total test time timeout is for now provided for the real_data
build
Redmine: refs #3462
Set as draft until sure all functionalities work, then a second commit should be added to tune the test phase total time timeout for the real_data
build to some reasonable start value (may also need to wait until the problem of the too long init time of tracking is resolved and the build times are back close to the original duration)