Skip to content

Commit 20af837

Browse files
committed
Merge pull request #123 from mapuri/parallel_sanity
Misc changes for parallel sanity
2 parents cd9f82e + 5ece4f1 commit 20af837

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

Makefile

+12-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ TO_BUILD := ./netplugin/ ./netmaster/ ./netdcli/ ./mgmtfn/k8contivnet/ ./mgmtfn/
99
HOST_GOBIN := `which go | xargs dirname`
1010
HOST_GOROOT := `go env GOROOT`
1111

12-
all: build unit-test system-test system-test-dind
12+
all: build unit-test system-test system-test-dind centos-tests
13+
14+
# 'all-CI' target is used by the scripts/CI.sh that passes appropriate set of
15+
# ENV variables (from the jenkins job) to run OS (centos, ubuntu etc) and
16+
# sandbox specific(vagrant, docker-in-docker)
17+
all-CI: build unit-test system-test
1318

1419
default: build
1520

@@ -51,15 +56,15 @@ unit-test-centos: build
5156
# on first failure and leave setup in that state. This can be useful for debugging
5257
# as part of development.
5358
system-test: build
54-
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 30m -v -run "sanity" \
59+
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 30m -run "sanity" \
5560
github.com/contiv/netplugin/systemtests/singlehost
56-
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 80m -v -run "sanity" \
61+
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 80m -run "sanity" \
5762
github.com/contiv/netplugin/systemtests/twohosts
5863

5964
system-test-centos: build
60-
CONTIV_NODE_OS=centos CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 30m -v -run "sanity" \
65+
CONTIV_NODE_OS=centos CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 30m -run "sanity" \
6166
github.com/contiv/netplugin/systemtests/singlehost
62-
CONTIV_NODE_OS=centos CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 90m -v -run "sanity" \
67+
CONTIV_NODE_OS=centos CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 90m -run "sanity" \
6368
github.com/contiv/netplugin/systemtests/twohosts
6469

6570
centos-tests: unit-test-centos system-test-centos
@@ -68,9 +73,9 @@ centos-tests: unit-test-centos system-test-centos
6873
# on first failure and leave setup in that state. This can be useful for debugging
6974
# as part of development.
7075
regress-test: build
71-
CONTIV_HOST_GOPATH=$(GOPATH) godep go test -v -run "regress" \
76+
CONTIV_HOST_GOPATH=$(GOPATH) godep go test -run "regress" \
7277
github.com/contiv/netplugin/systemtests/singlehost
73-
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 60m -v -run "regress" \
78+
CONTIV_HOST_GOPATH=$(GOPATH) godep go test --timeout 60m -run "regress" \
7479
github.com/contiv/netplugin/systemtests/twohosts
7580

7681
# Setting CONTIV_TESTBED=DIND uses docker in docker as the testbed instead of vagrant VMs.

Vagrantfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ fi
5353
## pass the env-var args to docker and restart the service. This helps passing
5454
## stuff like http-proxy etc
5555
if [ $# -gt 0 ]; then
56-
(echo "export $@" >> /etc/default/docker && \
57-
service docker restart) || exit 1
56+
(echo "export $@" >> /etc/default/docker) || exit 1
5857
fi
58+
(service docker restart) || exit 1
5959
6060
## install openvswitch and enable ovsdb-server to listen for incoming requests
6161
#(apt-get install -y openvswitch-switch > /dev/null) || exit 1
@@ -85,10 +85,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8585
config.vm.box = "contiv/centos"
8686
else
8787
config.vm.box = "contiv/ubuntu-v4"
88-
# Commenting out the url since we host the image on Atlas.
89-
# config.vm.box_url = "https://cisco.box.com/shared/static/27u8utb1em5730rzprhr5szeuv2p0wir.box"
9088
end
91-
num_nodes = 2
89+
num_nodes = 1
9290
if ENV['CONTIV_NODES'] && ENV['CONTIV_NODES'] != "" then
9391
num_nodes = ENV['CONTIV_NODES'].to_i
9492
end

scripts/CI.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export GOSRC=$GOPATH/src
1212
export PATH=$PATH:/sbin/:/usr/local/go/bin:$GOBIN
1313

1414
cd $GOSRC/github.com/contiv/netplugin
15-
make
15+
make all-CI

scripts/unittests

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ for pkg in ${test_packages}
6161
do
6262
# running in the sand box
6363
(cd $GOSRC/github.com/contiv/netplugin && \
64-
godep go test -v ${pkg}) || exit 1
64+
godep go test ${pkg}) || exit 1
6565
done
6666

6767
echo "Sandbox: Tests succeeded!"

0 commit comments

Comments
 (0)