summaryrefslogtreecommitdiff
path: root/vendor/github.com/vishvananda/netlink/Makefile
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-24 16:52:02 +0200
committerGitHub <noreply@github.com>2019-06-24 16:52:02 +0200
commit72260a296c534950d9c899ee907e73b5dd0162f0 (patch)
treed9b33042a70c2d1e600c75855a29b3aa594aaab6 /vendor/github.com/vishvananda/netlink/Makefile
parentcf244d87cdb9b2cb0d8510b2ea392d928c1eb269 (diff)
parentd697456dc90adbaf68224ed7c115b38d5855e582 (diff)
downloadpodman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.gz
podman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.bz2
podman-72260a296c534950d9c899ee907e73b5dd0162f0.zip
Merge pull request #3414 from vrothberg/go-modules
Go modules
Diffstat (limited to 'vendor/github.com/vishvananda/netlink/Makefile')
-rw-r--r--vendor/github.com/vishvananda/netlink/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/github.com/vishvananda/netlink/Makefile b/vendor/github.com/vishvananda/netlink/Makefile
new file mode 100644
index 000000000..a0e68e7a9
--- /dev/null
+++ b/vendor/github.com/vishvananda/netlink/Makefile
@@ -0,0 +1,30 @@
+DIRS := \
+ . \
+ nl
+
+DEPS = \
+ github.com/vishvananda/netns \
+ golang.org/x/sys/unix
+
+uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
+testdirs = $(call uniq,$(foreach d,$(1),$(dir $(wildcard $(d)/*_test.go))))
+goroot = $(addprefix ../../../,$(1))
+unroot = $(subst ../../../,,$(1))
+fmt = $(addprefix fmt-,$(1))
+
+all: test
+
+$(call goroot,$(DEPS)):
+ go get $(call unroot,$@)
+
+.PHONY: $(call testdirs,$(DIRS))
+$(call testdirs,$(DIRS)):
+ go test -test.exec sudo -test.parallel 4 -timeout 60s -test.v github.com/vishvananda/netlink/$@
+
+$(call fmt,$(call testdirs,$(DIRS))):
+ ! gofmt -l $(subst fmt-,,$@)/*.go | grep -q .
+
+.PHONY: fmt
+fmt: $(call fmt,$(call testdirs,$(DIRS)))
+
+test: fmt $(call goroot,$(DEPS)) $(call testdirs,$(DIRS))