Skip to content

Commit

Permalink
Merge branch 'main' into essential
Browse files Browse the repository at this point in the history
  • Loading branch information
JW committed Aug 11, 2021
2 parents 9fde214 + a6e0b15 commit e9f5835
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ if [[ ${tc_folder} == "" ]]; then
tc_folder="./testcases"
fi

# If there are no testcases files in ${tc_folder} exit with message
# See issue #78
if [ $(ls -l ${tc_folder%/}/*.sh | wc -l) -eq 0 ]; then
message="No testcases found in ${tc_folder}."
whiptail --msgbox --title "CalliopEO Test" "${message}" 10 70
exit 1
fi

whiptail_args+=(
--backtitle "CalliopEO Test"
--title "Select Tests"
Expand All @@ -50,12 +58,14 @@ whiptail_args+=(
26 80 16
)

# Add testcase files as selection list to dialogue box
i=0
for f in ${tc_folder%/}/*.sh
do
whiptail_args+=( "$((++i))" "${f##*/}" "on" )
done

# Show dialog box to let the user select the testcases
selected=$(whiptail "${whiptail_args[@]}" 3>&1 1>&2 2>&3)

# Exit if user selected "Cancel"
Expand Down

0 comments on commit e9f5835

Please sign in to comment.