#!/usr/bin/make -f

D = debian/golang-pgregory-rapid-dev
M = $(D)/usr/share/gocode/src/pgregory.net/rapid

# XXX: Some tests fail hard when asynctimerchan!=0 which is the default when
# GO111MODULE is set to off.
export GODEBUG = asynctimerchan=0

%:
	dh $@ --builddirectory=debian/_build

# Remove indeterministic test data created during the test suite run.
execute_after_dh_auto_install:
	rm -f $(M)/vis-test.html
	rm -f $(M)/testdata/rapid/TestCheckCleanupPanic/*.fail
	rmdir -p --ignore-fail-on-non-empty \
	  $(M)/testdata/rapid/TestCheckCleanupPanic/
