11 echo '################################################################################'
13 echo '################################################################################'
20 header "Cleaning up leftovers from previous runs"
22 for name in tinc tincd; do
23 sudo pkill -TERM -x "$name" || true
24 sudo pkill -KILL -x "$name" || true
28 sudo chown -R "${USER:-$(whoami)}" .
30 mkdir -p sanitizer /tmp/logs
32 header "Running test flavor $flavor"
36 DISTCHECK_CONFIGURE_FLAGS=$(sh .ci/conf.sh "$@")
37 export DISTCHECK_CONFIGURE_FLAGS
39 # shellcheck disable=SC2086
40 ./configure $DISTCHECK_CONFIGURE_FLAGS
42 make -j"$(nproc)" all extra
44 if [ "$(uname -s)" = Linux ]; then
51 make $cmd -j2 VERBOSE=1 || code=$?
53 sudo tar -c -z -f "/tmp/logs/tests.$flavor.tar.gz" test/ sanitizer/
60 if [ -n "${HOST:-}" ]; then
61 # Needed for cross-compilation for 32-bit targets.
62 export CPPFLAGS="${CPPFLAGS:-} -D_FILE_OFFSET_BITS=64"
72 nproc() { sysctl -n hw.ncpu; }
73 gcrypt=$(brew --prefix libgcrypt)
74 openssl=$(brew --prefix openssl)
75 export CPPFLAGS="${CPPFLAGS:-} -I/usr/local/include -I$gcrypt/include -I$openssl/include -I$gcrypt/include"
84 run_tests nolegacy --disable-legacy-protocol
87 run_tests gcrypt --with-libgcrypt
90 if [ -d /opt/ssl3 ]; then
91 run_tests openssl3 --with-openssl=/opt/ssl3 --with-openssl-include=/opt/ssl3/include --with-openssl-lib=/opt/ssl3/lib64
93 echo >&2 "OpenSSL 3 not installed, skipping test"
97 bail "unknown test flavor $1"