ansible: Deploy combined key+cert for haproxy
[lttng-ci.git] / scripts / system-tests / run-test-suites.sh
index 90c4754e90ae7f9b1b985bd54af704cc4cd06c81..81be13f42c921d05b2a7988f5221c83d63d89de2 100755 (executable)
@@ -68,16 +68,37 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+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
+
 lttng_version="$1"
 failed_tests=0
 
 export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system"
+timedatectl set-ntp false
 
+# When make check is interrupted, the default test driver
+# (`config/test-driver`) will still delete the log and trs
+# files for the currently running test.
+#
 timeout 90m make --keep-going check || failed_tests=1
 
 if [ -f "./tests/root_regression" ]; then
     cd "./tests" || exit 1
-    prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1
+    prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=2
     cd ..
 fi
 
@@ -85,7 +106,7 @@ fi
 # should be retained until lttng-tools 2.13 is no longer supported
 if [ -f "./tests/root_destructive_tests" ]; then
     cd "./tests" || exit 1
-    prove --nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests=2
+    prove --nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests=3
     cd ..
 else
     echo 'root_destructive_tests not found'
This page took 0.024021 seconds and 4 git commands to generate.