Skip to content

Commit

Permalink
Add test for ARM64 for tanzu-cli
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
  • Loading branch information
marckhouzam committed Jun 27, 2024
1 parent 7df4a82 commit 1e8cc06
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

. $HOME/.asdf/asdf.sh

set -x
[[ -z ${DEBUGX:-} ]] || set -x
set -euo pipefail

Expand All @@ -16,7 +17,18 @@ sep=" "
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
repo_dir="$script_dir/.."


function checkBinaryArch() {
local plugin_name=$1
local wanted_arch=$(a=$(uname -m) && ([ $a = aarch64 ] || [ $a = arm64 ]) && printf arm64 || printf x86_64)

# Add below the plugins that install the proper architecture.
case $plugin_name in
tanzu):
echo -e "\nChecking $plugin_name is of arch $wanted_arch"
file $(asdf which "$plugin_name")
;;
esac
}

function test_plugin() {
local plugin_name=$1
Expand Down Expand Up @@ -52,6 +64,8 @@ function test_plugin() {
"$plugin_name" "$VERSION_COMMAND"
fi

checkBinaryArch $plugin_name

echo -e "\n####### Finished: $plugin_name"
echo -e "#########################################\n"
}
Expand Down

0 comments on commit 1e8cc06

Please sign in to comment.