#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export NO_NET_ACCESS=1
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/test-reports {build_dir}/screenshots
export PYTEST_QT_API=pyside6
# Run the library test suite only.  Upstream does not gate the wheel on the
# Qt GUI tests either (cibuildwheel: "pytest test --ignore=test/asammdf/gui",
# tox libtests: "pytest -k 'not gui'"); they are slow and unreliable headless.
export PYBUILD_TEST_ARGS=--ignore=test/asammdf/gui

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
export CFLAGS+=$(CPPFLAGS)

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
	xvfb-run -a -s "-screen 0 1024x768x24" dh_auto_test
