#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure:
	# Run network tests only if localhost is reachable, the perl snippet touch
	# run_network_tests if the loopback interface is available.
	perl -MNet::Ping -e '(Net::Ping->new()->ping("127.0.0.1", 1)) ? \
		system("touch run_network_tests") : system("rm -rf run_network_tests");'
	dh_auto_configure

override_dh_auto_test:
	xvfb-run -a dh_auto_test
