lava: Wait until time is synchronised during test suite cleanup
[lttng-ci.git] / scripts / system-tests / run-test-suites.sh
index 62ab7d24dcca4abccb6ee03ebb104620d5083a10..81be13f42c921d05b2a7988f5221c83d63d89de2 100755 (executable)
@@ -71,6 +71,15 @@ verne() {
 function cleanup
 {
     timedatectl set-ntp true
+    # The false dates used in the tests are far in the past
+    # and it may take some time for the ntp update to actually
+    # happen.
+    # If the date is still in the past, it is possible that
+    # subsequent steps will fail (eg. TLS certificates cannot
+    # be validated).
+    while [[ "$(date +%Y)" -lt "2024" ]] ; do
+        sleep 1
+    done
 }
 
 trap cleanup EXIT SIGINT SIGTERM
@@ -107,5 +116,4 @@ if [[ "${failed_tests}" != "0" ]] ; then
     find tests/ -iname '*.trs' -print0 -or -iname '*.log' -print0 | tar czf /tmp/coredump/logs.tgz --null -T -
 fi
 
-timedatectl set-ntp true
 exit $failed_tests
This page took 0.02295 seconds and 4 git commands to generate.