mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 12:11:43 +00:00
Merge pull request #6783 from eparis/use-hack-lib-find-binaries
Use a helper to find built binaries
This commit is contained in:
@@ -21,50 +21,8 @@ set -o pipefail
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
# --- Find local test binaries.
|
||||
|
||||
# Detect the OS name/arch so that we can find our binary
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
host_os=darwin
|
||||
;;
|
||||
Linux)
|
||||
host_os=linux
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported host OS. Must be Linux or Mac OS X." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$(uname -m)" in
|
||||
x86_64*)
|
||||
host_arch=amd64
|
||||
;;
|
||||
i?86_64*)
|
||||
host_arch=amd64
|
||||
;;
|
||||
amd64*)
|
||||
host_arch=amd64
|
||||
;;
|
||||
arm*)
|
||||
host_arch=arm
|
||||
;;
|
||||
i?86*)
|
||||
host_arch=x86
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported host arch. Must be x86_64, 386 or arm." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# Gather up the list of likely places and use ls to find the latest one.
|
||||
locations=(
|
||||
"${KUBE_ROOT}/_output/dockerized/bin/${host_os}/${host_arch}/e2e"
|
||||
"${KUBE_ROOT}/_output/local/bin/${host_os}/${host_arch}/e2e"
|
||||
"${KUBE_ROOT}/platforms/${host_os}/${host_arch}/e2e"
|
||||
)
|
||||
e2e=$( (ls -t "${locations[@]}" 2>/dev/null || true) | head -1 )
|
||||
source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||
e2e=$(kube::util::find-binary "e2e")
|
||||
|
||||
# --- Setup some env vars.
|
||||
|
||||
|
Reference in New Issue
Block a user