#!/usr/bin/make -f

export DH_GOLANG_INSTALL_EXTRA := cmd/sunlight/home.html

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

# TestCCADBRoots: roots_test.go:19: failed to load CCADB roots: failed to fetch CCADB CSV: Get "https://ccadb.my.salesforce-sites.com/ccadb/RootCACertificatesIncludedByRSReportCSV": dial tcp: lookup ccadb.my.salesforce-sites.com on [::1]:53: read udp [::1]:55113->[::1]:53: read: connection refused
# TestSequenceLargeLog: https://github.com/FiloSottile/sunlight/issues/61
override_dh_auto_test:
	-dh_auto_test $(DH_BUILD_OPTS) -- \
		-timeout 30m \
		-run="TestCCADBRoots|TestSubmit|TestSequenceLargeLog" 2>&1 \
	 | grep -v 'failed to parse certificate: asn1: structure error:'
	dh_auto_test $(DH_BUILD_OPTS) -- \
		-timeout 30m \
		-skip="TestCCADBRoots|TestSubmit|TestSequenceLargeLog"
