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 <[email protected]>
  • Loading branch information
marckhouzam committed Jun 27, 2024
1 parent 7df4a82 commit 8200692
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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)

# 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") | grep $wanted_arch
;;
esac
}

function test_plugin() {
local plugin_name=$1
Expand Down Expand Up @@ -52,6 +63,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 8200692

Please sign in to comment.