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 6506e6c..570c8e8 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -127,7 +127,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 " -l|--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"
@@ -191,8 +191,8 @@
MEMCHECK=1
;;
# Please check scripts/check_test_cases.py correspondingly
- # if you have to modify option, --list-test-case
- --list-test-case)
+ # if you have to modify option, --list-test-cases
+ --list-test-cases)
list_test_case
exit $?
;;
@@ -869,7 +869,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() {