check_test_cases: Unify walk_compat_sh and walk_opt_sh into one
walk_compat_sh and walk_opt_sh are basically the same now, so:
* Merge them into one function.
* Use the --list-test-cases option for both of them.
* Rename this merged function as collect_from_script which seems
more appropriate as since it isn't iterating the script but
calling it.
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
diff --git a/tests/compat.sh b/tests/compat.sh
index de9dc40..cb15176 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -129,7 +129,7 @@
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"
+ printf " --list-test-cases\tList all potential test cases (No Execution)\n"
printf " --outcome-file\tFile where test outcomes are written\n"
printf " \t(default: \$MBEDTLS_TEST_OUTCOME_FILE, none if empty)\n"
printf " --preserve-logs\tPreserve logs of successful tests as well\n"
@@ -144,7 +144,7 @@
}
# list_test_case lists all potential test cases in compat.sh without execution
-list_test_case() {
+list_test_cases() {
for MODE in $MODES; do
for TYPE in $TYPES; do
for VERIFY in $VERIFIES; do
@@ -192,9 +192,9 @@
MEMCHECK=1
;;
# Please check scripts/check_test_cases.py correspondingly
- # if you have to modify option, --list-test-case
- --list-test-case)
- list_test_case
+ # if you have to modify option, --list-test-cases
+ --list-test-cases)
+ list_test_cases
exit $?
;;
--outcome-file)
@@ -1254,7 +1254,7 @@
}
# uniform_title <CLIENT> <SERVER> <STANDARD_CIPHER_SUITE>
-# $TITLE is considered as test case description for both --list-test-case and
+# $TITLE is considered as test case description for both --list-test-cases and
# MBEDTLS_TEST_OUTCOME_FILE. This function aims to control the format of
# each test case description.
uniform_title() {