diff --git a/.gitignore b/.gitignore index daf913b1b..bd26a7914 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ _testmain.go *.exe *.test *.prof + +.vagrant diff --git a/Makefile b/Makefile index c94eace2c..7f9b18e1d 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ .PHONY: all build clean default system-test unit-test -TO_BUILD := ./ ./netdcli/ +TO_BUILD := ./netmaster/ ./netdcli/ +ifeq ($(uname -s),Linux) HOST_GOBIN := `which go | xargs dirname` HOST_GOROOT := `go env GOROOT` +endif all: build unit-test system-test @@ -27,10 +29,10 @@ clean-demo: unit-test: build CONTIV_HOST_GOBIN=$(HOST_GOBIN) CONTIV_HOST_GOROOT=$(HOST_GOROOT) ./scripts/unittests -vagrant -system-test: build +system-test: go test -v -run "sanity" github.com/contiv/netplugin/systemtests/singlehost go test --timeout 20m -v -run "sanity" github.com/contiv/netplugin/systemtests/twohosts -regress-test: build +regress-test: go test -v -run "regress" github.com/contiv/netplugin/systemtests/singlehost go test --timeout 60m -v -run "regress" github.com/contiv/netplugin/systemtests/twohosts diff --git a/Vagrantfile b/Vagrantfile index aa0f76add..816da90ac 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,9 +1,9 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -netplugin_synced_gopath="/opt/golang" -host_gobin_path="/opt/go/bin" -host_goroot_path="/opt/go/root" +netplugin_synced_gopath = "/opt/golang" +host_gobin_path = ENV['CONTIV_HOST_GOBIN'] +host_goroot_path = ENV['CONTIV_HOST_GOROOT'] provision_common = <