Skip to content

Commit da9d00d

Browse files
author
Erik Hollensbe
committed
Merge pull request #144 from contiv/go1.4.2-check
scripts/checks: adjust to ensure go 1.4.2 is in use
2 parents a1e0259 + d9706d9 commit da9d00d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ unit-test-centos: stop clean
8787
system-test: system-test-singlehost system-test-multihost
8888

8989
# the `make stop` here and below are necessary because build leaves around a VM (intentionally)
90-
system-test-singlehost: stop clean
90+
system-test-singlehost: stop clean checks
9191
make build stop
9292
godep go test -v --timeout 30m -run "sanity" \
9393
github.com/contiv/netplugin/systemtests/singlehost
9494

95-
system-test-multihost: stop clean
95+
system-test-multihost: stop clean checks build
9696
make build stop
9797
godep go test -v --timeout 80m -run "sanity" \
9898
github.com/contiv/netplugin/systemtests/twohosts

scripts/checks

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ BUILD_PKGS=$1
1313

1414
echo "+++ Checking Go version..."
1515
ver=$(go version | awk '{print $3}')
16-
minVer="go1.4"
16+
minVer="go1.4.2"
17+
maxVer="go1.4.2"
1718
if [[ ${ver} < ${minVer} ]]; then
1819
echo "!!! Go version check failed. Expected >=${minVer} but found ${ver}"
1920
exit 1
2021
fi
2122

23+
if [[ ${ver} > ${maxVer} ]]; then
24+
echo "!!! Go version check failed. Expected =<${maxVer} but found ${ver}"
25+
exit 1
26+
fi
27+
2228
echo "+++ Checking gofmt..."
2329
fmtRes=$(gofmt -l $BUILD_PKGS)
2430
if [ -n "${fmtRes}" ]; then

0 commit comments

Comments
 (0)