#!/bin/sh
set -eu

# The `build-needed` restriction builds the package and leaves the build
# directory as `obj-$(DEB_HOST_GNU_TYPE)`.
#
# Running `meson test` in the build directory exercises the package against the
# archive versions of its build dependencies which can help catch regressions
# from library, compiler or toolchain migrations.

BUILD_DIR="obj-$(dpkg-architecture -qDEB_HOST_GNU_TYPE)"

meson test \
    -C "$BUILD_DIR" \
	--no-rebuild \
	--print-errorlogs
