summaryrefslogtreecommitdiffstats
path: root/tests/dnstap/src/dnstap-test/dnstap.mk
blob: ab462a99ab668a3b87e04d21d8d323886c5720f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# dnstap tests
GOPATH := $(abspath tests/dnstap)
DNSTAP_TEST := dnstap-test
DNSTAP_PATH := $(GOPATH)/src/$(DNSTAP_TEST)
CONFIG := $(DNSTAP_PATH)/config
CMD := daemon/kresd
ZONES := "fake1.localdomain,fake2.localdomain,fake3.localdomain"
TIMEOUT := 60s
check-dnstap: daemon
	@echo "Checking dnstap functionality"
	GOPATH=$(GOPATH) go get -u github.com/FiloSottile/gvt
	cd $(DNSTAP_PATH) && $(GOPATH)/bin/gvt restore
	GOPATH=$(GOPATH) go install $(DNSTAP_TEST)
	$(GOPATH)/bin/$(DNSTAP_TEST) -c $(CONFIG) -cmd $(CMD) -q $(ZONES) -t $(TIMEOUT)

clean-dnstap:
	rm -rf $(GOPATH)/{bin,pkg,src/dnstap-test/vendor/github.com,src/github.com}

.PHONY: check-dnstap clean-dnstap