mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 12:32:48 +00:00
compat.sh: add --list-test-case
The option --list-test-case lists all potential test cases without executing them. The test case description is identical with $TITLE during test case execution. Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
406b9172ad
commit
d893837d01
@ -110,6 +110,36 @@ print_usage() {
|
||||
printf " \tAlso available: GnuTLS (needs v3.2.15 or higher)\n"
|
||||
printf " -M|--memcheck\tCheck memory leaks and errors.\n"
|
||||
printf " -v|--verbose\tSet verbose output.\n"
|
||||
printf " --list-test-case\tList all potential test cases (No Execution)\n"
|
||||
}
|
||||
|
||||
# print_test_title <CLIENT> <SERVER> <STANDARD_CIPHER_SUITE>
|
||||
print_test_title() {
|
||||
for i in $3; do
|
||||
TITLE="$1->$2 $MODE,$VERIF $i"
|
||||
echo "$TITLE"
|
||||
done
|
||||
}
|
||||
|
||||
list_test_case() {
|
||||
reset_ciphersuites
|
||||
for TYPE in $TYPES; do
|
||||
add_common_ciphersuites
|
||||
add_openssl_ciphersuites
|
||||
add_gnutls_ciphersuites
|
||||
add_mbedtls_ciphersuites
|
||||
done
|
||||
|
||||
for VERIFY in $VERIFIES; do
|
||||
VERIF=$(echo $VERIFY | tr '[:upper:]' '[:lower:]')
|
||||
for MODE in $MODES; do
|
||||
print_test_title m o "$O_CIPHERS"
|
||||
print_test_title o m "$O_CIPHERS"
|
||||
print_test_title m g "$G_CIPHERS"
|
||||
print_test_title g m "$G_CIPHERS"
|
||||
print_test_title m m "$M_CIPHERS"
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
get_options() {
|
||||
@ -139,6 +169,10 @@ get_options() {
|
||||
-M|--memcheck)
|
||||
MEMCHECK=1
|
||||
;;
|
||||
--list-test-case)
|
||||
list_test_case
|
||||
exit 0
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user