#!/bin/sh
# Build and run the full upstream test suite, including the privileged
# tun / firewall / root tests that the package build skips. Those need a
# real tun device, network namespaces and root, provided here by the
# isolation-machine restriction.
# Copyright (c) 2020 Aron Xu <aron@debian.org>

set -e

builddir="${AUTOPKGTEST_TMP:-.}/build"

# root-tests and tun-tests default to enabled in meson; unlike the package
# build (debian/rules) we deliberately leave them on here.
meson setup "$builddir" \
	-Dsystemd=enabled \
	-Dlatency-stats=enabled \
	-Doidc-auth=enabled \
	-Dlocal-llhttp=false
meson compile -C "$builddir"
meson test -C "$builddir" --print-errorlogs --timeout-multiplier 6
