#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

# Upstream's test target is "test", not "check".  Run its driver
# directly, skipping the *.test.xz files, which are only git-lfs
# pointers in the release tarball.
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LD_PRELOAD=libcpuid/.libs/libcpuid.so tests/run_tests.py \
		cpuid_tool/.libs/cpuid_tool $$(find tests -name '*.test' | LC_ALL=C sort)
endif
