Skip to content

Commit

Permalink
Improve bash checking in test_finder.sh for all OSes
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Feb 5, 2024
1 parent 06a6447 commit b6db1df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test_finder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ if [ -z $TEST_TYPE ]; then
[ -f $OSD_BUILD_MANIFEST ] && TEST_TYPE="manifest" || TEST_TYPE="default"
fi

[ ! `echo $SHELL | grep 'bash'` ] && echo "You must run this script with bash as other shells like zsh will fail the script, exit in 10" && sleep 10 && exit 1
if [ `echo $OSTYPE | grep -i 'linux'` ] || [ `echo $OSTYPE | grep -i 'darwin'` ]
then
[ ! `echo $SHELL | grep -i 'bash'` ] && echo "You must run this script with bash as other shells like zsh will fail the script, exit in 10!" && sleep 10 && exit 1
else
[ ! `readlink /proc/$$/exe | grep -i 'bash'` ] && echo "You must run this script with bash as other shells like zsh will fail the script, exit in 10!!" && sleep 10 && exit 1
fi


# Checks if build manifest in parent directory of current directory under local-test-cluster/opensearch-dashboards-*
# When the test script executed in the CI, it scales up OpenSearch Dashboards under local-test-cluster with a
Expand Down

0 comments on commit b6db1df

Please sign in to comment.