summaryrefslogtreecommitdiffstats
path: root/debian/tests/upstream-simulation-test-suite
blob: 037ca36460f32ca14dd7558d81375c4fb73a264c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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