Skip to content

Commit

Permalink
Improve bash checking in test_finder.sh for all OSes (#1058) (#1059)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 7b1a0e1)

Co-authored-by: Peter Zhu <[email protected]>
  • Loading branch information
1 parent 9fc625b commit 135a040
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 @@ -23,7 +23,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 135a040

Please sign in to comment.