summaryrefslogtreecommitdiffstats
path: root/debian/tests/upstream-system-tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 12:48:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-09 12:48:03 +0000
commit6d46de912288f0875f0e3cca27b8d7455fa07b42 (patch)
treeb2ee235051d590490c0fdccbf0241b3706e292e7 /debian/tests/upstream-system-tests
parentAdding upstream version 4.5. (diff)
downloadchrony-6d46de912288f0875f0e3cca27b8d7455fa07b42.tar.xz
chrony-6d46de912288f0875f0e3cca27b8d7455fa07b42.zip
Adding debian version 4.5-1.debian/4.5-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/upstream-system-tests')
-rwxr-xr-xdebian/tests/upstream-system-tests24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/tests/upstream-system-tests b/debian/tests/upstream-system-tests
new file mode 100755
index 0000000..bd28a0c
--- /dev/null
+++ b/debian/tests/upstream-system-tests
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Run the upstream system tests in a container. Destructive tests will be run in
+# a VM as they may adjust/step the system clock, block the RTC, etc.
+# In case of failure, test’s logs will be put into the directory specified by
+# the $AUTOPKGTEST_ARTIFACTS environment variable.
+
+set -e
+
+testdir=$PWD/test/system
+logdir="$testdir/tmp/*"
+
+# some tests need chrony installed, but make sure to avoid the test daemon is
+# fighting with the systems chrony service over the clock
+systemctl stop chrony.service 2>/dev/null || true
+
+run_test() {
+ cd "$testdir" && ./run "$@"
+}
+
+artifacts() {
+ cp $logdir "$AUTOPKGTEST_ARTIFACTS" && exit 1
+}
+
+run_test "$@" || artifacts