#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := $(wildcard fuzzing/*/corpus)
# Experimental package needed for running the test suite in go 1.24
export GOEXPERIMENT := synctest
# Unclear why this is necessary, it should be the default.
export GODEBUG := asynctimerchan=0

execute_after_dh_auto_configure:
	find _build -name sys_conn_oob_test.go -print -delete

execute_after_dh_auto_test:
	find _build -name keylog.txt -print -delete

# Skip some flaky tests
override_dh_auto_test:
	dh_auto_test $(DH_BUILD_OPTS) -- \
		-skip=TestConnectionCloseRetransmission

override_dh_auto_install:
	dh_auto_install -- --no-binaries

%:
	dh $@ --builddirectory=_build --buildsystem=golang --with=golang
