summaryrefslogtreecommitdiff
path: root/vendor/github.com/vishvananda/netlink
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/vishvananda/netlink')
-rw-r--r--vendor/github.com/vishvananda/netlink/.travis.yml13
-rw-r--r--vendor/github.com/vishvananda/netlink/CHANGELOG.md5
-rw-r--r--vendor/github.com/vishvananda/netlink/Makefile30
3 files changed, 48 insertions, 0 deletions
diff --git a/vendor/github.com/vishvananda/netlink/.travis.yml b/vendor/github.com/vishvananda/netlink/.travis.yml
new file mode 100644
index 000000000..f5c0b3eb5
--- /dev/null
+++ b/vendor/github.com/vishvananda/netlink/.travis.yml
@@ -0,0 +1,13 @@
+language: go
+before_script:
+ # make sure we keep path in tact when we sudo
+ - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
+ # modprobe ip_gre or else the first gre device can't be deleted
+ - sudo modprobe ip_gre
+ # modprobe nf_conntrack for the conntrack testing
+ - sudo modprobe nf_conntrack
+ - sudo modprobe nf_conntrack_netlink
+ - sudo modprobe nf_conntrack_ipv4
+ - sudo modprobe nf_conntrack_ipv6
+install:
+ - go get github.com/vishvananda/netns
diff --git a/vendor/github.com/vishvananda/netlink/CHANGELOG.md b/vendor/github.com/vishvananda/netlink/CHANGELOG.md
new file mode 100644
index 000000000..b11e59ff6
--- /dev/null
+++ b/vendor/github.com/vishvananda/netlink/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Changelog
+
+## 1.0.0 (2018-03-15)
+
+Initial release tagging \ No newline at end of file
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))