Address review comments.

This commit is contained in:
Madhusudan.C.S
2016-05-10 13:43:33 -07:00
parent dcaf005ffe
commit dd154350e8
2 changed files with 90 additions and 98 deletions

View File

@@ -450,9 +450,16 @@ kube::golang::build_binaries_for_platform() {
"${platform}")
local testpkg="$(dirname ${test})"
if [[ "$(${teststale} -binary "${outfile}" -package "${testpkg}")" == "false" ]]; then
if ! ${teststale} -binary "${outfile}" -package "${testpkg}"; then
continue
fi
# `go test -c` below directly builds the binary. It builds the packages,
# but it never installs them. `go test -i` only installs the dependencies
# of the test, but not the test package itself. So neither `go test -c`
# nor `go test -i` installs, for example, test/e2e.a. And without that,
# doing a staleness check on k8s.io/kubernetes/test/e2e package always
# returns true (always stale). And that's why we need to install the
# test package.
go install "${goflags[@]:+${goflags[@]}}" \
-ldflags "${goldflags}" \
"${testpkg}"