summaryrefslogtreecommitdiffstats
path: root/tests/dnstap/src/dnstap-test/dnstap.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
commit3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch)
treef87bd4a126b3a843858eb447e8fd5893c3ee3882 /tests/dnstap/src/dnstap-test/dnstap.mk
parentInitial commit. (diff)
downloadknot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz
knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dnstap/src/dnstap-test/dnstap.mk')
-rw-r--r--tests/dnstap/src/dnstap-test/dnstap.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/dnstap/src/dnstap-test/dnstap.mk b/tests/dnstap/src/dnstap-test/dnstap.mk
new file mode 100644
index 0000000..ab462a9
--- /dev/null
+++ b/tests/dnstap/src/dnstap-test/dnstap.mk
@@ -0,0 +1,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