mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-24 22:15:07 +00:00
Add option to print test numbers in ssl-opt.sh output
Allows for easy selection of tests based on numbers for use with the '-n' option
This commit is contained in:
parent
6507891e65
commit
9911faa1b4
|
@ -33,6 +33,7 @@ MEMCHECK=0
|
||||||
FILTER='.*'
|
FILTER='.*'
|
||||||
EXCLUDE='^$'
|
EXCLUDE='^$'
|
||||||
|
|
||||||
|
SHOW_TEST_NUMBER=0
|
||||||
RUN_TEST_NUMBER=''
|
RUN_TEST_NUMBER=''
|
||||||
|
|
||||||
print_usage() {
|
print_usage() {
|
||||||
|
@ -42,6 +43,7 @@ print_usage() {
|
||||||
printf " -f|--filter\tOnly matching tests are executed (default: '$FILTER')\n"
|
printf " -f|--filter\tOnly matching tests are executed (default: '$FILTER')\n"
|
||||||
printf " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')\n"
|
printf " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')\n"
|
||||||
printf " -n|--number\tExecute only numbered test (comma-separated, e.g. '245,256')\n"
|
printf " -n|--number\tExecute only numbered test (comma-separated, e.g. '245,256')\n"
|
||||||
|
printf " -s|--show-numbers\tShow test numbers in front of test names\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_options() {
|
get_options() {
|
||||||
|
@ -59,6 +61,9 @@ get_options() {
|
||||||
-n|--number)
|
-n|--number)
|
||||||
shift; RUN_TEST_NUMBER=$1
|
shift; RUN_TEST_NUMBER=$1
|
||||||
;;
|
;;
|
||||||
|
-s|--show-numbers)
|
||||||
|
SHOW_TEST_NUMBER=1
|
||||||
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
print_usage
|
print_usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -143,12 +148,19 @@ needs_more_time() {
|
||||||
|
|
||||||
# print_name <name>
|
# print_name <name>
|
||||||
print_name() {
|
print_name() {
|
||||||
printf "$1 "
|
TESTS=$(( $TESTS + 1 ))
|
||||||
LEN=$(( 72 - `echo "$1" | wc -c` ))
|
LINE=""
|
||||||
|
|
||||||
|
if [ "$SHOW_TEST_NUMBER" -gt 0 ]; then
|
||||||
|
LINE="$TESTS "
|
||||||
|
fi
|
||||||
|
|
||||||
|
LINE="$LINE$1"
|
||||||
|
printf "$LINE "
|
||||||
|
LEN=$(( 72 - `echo "$LINE" | wc -c` ))
|
||||||
for i in `seq 1 $LEN`; do printf '.'; done
|
for i in `seq 1 $LEN`; do printf '.'; done
|
||||||
printf ' '
|
printf ' '
|
||||||
|
|
||||||
TESTS=$(( $TESTS + 1 ))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# fail <message>
|
# fail <message>
|
||||||
|
|
Loading…
Reference in a new issue