Browse Source

Allow mftest -t to select by number

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
committed by Scott Lahteine
parent
commit
69fcd9210f
  1. 13
      buildroot/share/git/mftest

13
buildroot/share/git/mftest

@ -115,8 +115,8 @@ case $TESTENV in
due) TESTENV='DUE' ;;
esp) TESTENV='esp32' ;;
lin*) TESTENV='linux_native' ;;
lpc?(8)) TESTENV='LPC1768' ;;
lpc9) TESTENV='LPC1769' ;;
lp8|lpc8) TESTENV='LPC1768' ;;
lp9|lpc9) TESTENV='LPC1769' ;;
m128) TESTENV='mega1280' ;;
m256) TESTENV='mega2560' ;;
mega) TESTENV='mega2560' ;;
@ -132,6 +132,7 @@ lpc?(8)) TESTENV='LPC1768' ;;
t36) TESTENV='teensy35' ;;
t40) TESTENV='teensy41' ;;
t41) TESTENV='teensy41' ;;
[1-9][1-9]|[1-9]) TESTNUM=$TESTENV ; TESTENV=- ;;
esac
if ((AUTO_BUILD)); then
@ -217,8 +218,14 @@ if [[ $TESTENV == '-' ]]; then
echo
for (( ; ; ))
do
if [[ $TESTNUM -gt 0 ]]; then
NAMEIND=$TESTNUM
else
read -p "Select a test to apply (1-$IND) : " NAMEIND
[[ -z "$NAMEIND" ]] && { errout "(canceled)" ; exit 1 ; }
fi
[[ -z $NAMEIND ]] && { errout "(canceled)" ; exit 1 ; }
TESTENV=${NAMES[$NAMEIND-1]}
[[ $TESTNUM -gt 0 ]] && { echo "Preselected test $TESTNUM ... ($TESTENV)" ; TESTNUM='' ; }
[[ $NAMEIND =~ $ISNUM ]] && ((NAMEIND >= 1 && NAMEIND <= IND)) && { TESTENV=${NAMES[$NAMEIND-1]} ; echo ; break ; }
errout "Invalid selection."
done

Loading…
Cancel
Save