diff options
Diffstat (limited to 'debian/tests/upstream-simulation-test-suite')
-rw-r--r-- | debian/tests/upstream-simulation-test-suite | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/tests/upstream-simulation-test-suite b/debian/tests/upstream-simulation-test-suite new file mode 100644 index 0000000..037ca36 --- /dev/null +++ b/debian/tests/upstream-simulation-test-suite @@ -0,0 +1,26 @@ +#!/bin/sh +#Upstream makes use of “clknetsim” to test how well “chronyd” controls the +#system clocks in various conditions. Due to “clknetsim” not being available +#in Debian, let’s use autopkgtest facility to build it in a container and +#test “chronyd” from there. + +set -e + +if ! dpkg-architecture -ilinux-any; then + echo "Simulation tests supported only on Linux…" + exit 0 +fi + +cd test/simulation + +if [ ! -d clknetsim ]; then + if git clone https://github.com/mlichvar/clknetsim; then + cd clknetsim && git checkout 58c5e8b + fi +fi + +if [ ! -x "clknetsim" ] && [ ! -e "clknetsim.so" ]; then + make +fi + +cd - && ./run -i 20 -m 2 |