mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Change into the output directory before running go test -c.
This commit is contained in:
parent
bf1de72f4a
commit
90f61f3005
@ -359,16 +359,17 @@ kube::golang::build_binaries_for_platform() {
|
||||
fi
|
||||
|
||||
for test in "${tests[@]:+${tests[@]}}"; do
|
||||
local outfile=$(kube::golang::output_filename_for_binary "${test}" \
|
||||
"${platform}")
|
||||
local outfile=$(kube::golang::output_filename_for_binary "${test}" \
|
||||
"${platform}")
|
||||
# Go 1.4 added -o to control where the binary is saved, but Go 1.3 doesn't
|
||||
# have this flag. Whenever we deprecate go 1.3, update to use -o instead of
|
||||
# calling mv.
|
||||
# changing into the output directory.
|
||||
pushd "$(dirname ${outfile})"
|
||||
go test -c \
|
||||
"${goflags[@]:+${goflags[@]}}" \
|
||||
-ldflags "${version_ldflags}" \
|
||||
"$(dirname ${test})"
|
||||
mv -f "$(basename ${outfile})" "${outfile}"
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user