summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-09-08 17:10:13 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-09-08 17:13:30 -0400
commit15f9a01c4200c469460c2395867901861c885acb (patch)
treef07bb8445d31a50b875d781431f19479f6667ed3 /Makefile
parenta7a8b8d13155a8e96f26e649ebd5066253c79565 (diff)
maint: Add a `check` target to run tests, and add nescessary dependencies
This also downgrades the sys/unix dep. The golang.org/x/sys/unix library can't be updated past commit ab9e364efd8b52800ff7ee48a9ffba4e0ed78dfb (where I have it right now) until go commit 93da0b6e66f24c4c307e0df37ceb102a33306174 (currently on master) makes it in to a release. It narrowly missed the cut-off to be in go 1.9; I expect it to be in go 1.10 around February 2018.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index bd8ee0b..4b5506e 100644
--- a/Makefile
+++ b/Makefile
@@ -90,6 +90,11 @@ $(outdir)/go/src/nshd/nshd_files/paths.go: $(var.)bindir $(var.)conf_file $(var.
$(outdir)/go/bin/nshd: $(outdir)/$(files.generate) $(outdir)/go/src/nshd/nshd_files/paths.go
files.out.all += $(outdir)/go/src/nshd/nshd_files/paths.go
+$(outdir)/check:
+ GOPATH=$$PWD/go go test $$(GOPATH=$$PWD/go go list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(bins_go) | sort -u | grep -e ^nshd -e '\.[^/]*/')
+.PHONY: $(outdir)/check
+at.targets += $(outdir)/check
+
# Install