matrix:
fast_finish: true
-install:
- - |
- go get github.com/containernetworking/cni || true
- pushd ../cni
- GOARCH="${TARGET}" ./build.sh
- popd
-
script:
- |
if [ "${TARGET}" == "amd64" ]; then
- CNI_PATH="$(cd ../cni/bin && pwd)" GOARCH="${TARGET}" ./test.sh
+ GOARCH="${TARGET}" ./test.sh
else
GOARCH="${TARGET}" ./build.sh
fi
plugin="$(basename "$d")"
echo " $plugin"
# use go install so we don't duplicate work
- go build -o "${PWD}/bin/$plugin" -pkgdir "$GOPATH/pkg" "$@" "$REPO_PATH/$d"
+ if [ -n "$FASTBUILD" ]
+ then
+ GOBIN=${PWD}/bin go install -pkgdir $GOPATH/pkg "$@" $REPO_PATH/$d
+ else
+ go build -o "${PWD}/bin/$plugin" -pkgdir "$GOPATH/pkg" "$@" "$REPO_PATH/$d"
+ fi
fi
done
}
defer conn.Close()
- conn.SetDeadline(time.Now().Add(2 * time.Second))
+ conn.SetDeadline(time.Now().Add(20 * time.Second))
fmt.Fprintln(GinkgoWriter, "connected to", address)
message := "Aliquid melius quam pessimum optimum non est."
return false
}
- conn.SetDeadline(time.Now().Add(2 * time.Second))
+ conn.SetDeadline(time.Now().Add(20 * time.Second))
fmt.Fprintln(GinkgoWriter, "reading...")
response := make([]byte, len(message))
_, err = conn.Read(response)
# user has provided PKG override
else
- # strip out slashes and dots from PKG=./foo/
- TEST=${PKG//\//}
- TEST=${TEST//./}
+ TEST=$PKG
# only run gofmt on packages provided by user
FMT="$TEST"
exit 255
fi
-
+echo "Checking govet..."
+vetRes=$(go vet $TEST)
+if [ -n "${vetRes}" ]; then
+ echo -e "govet checking failed:\n${vetRes}"
+ exit 255
+fi