mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-19 06:47:56 +00:00
New option --list-components
Add an option to list the available components. This is not useful yet, but a subsequent commit will add the ability to run specific components.
This commit is contained in:
parent
782f411bf5
commit
348fb9a597
|
@ -106,6 +106,7 @@ pre_initialize_variables () {
|
||||||
|
|
||||||
MEMORY=0
|
MEMORY=0
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
INTROSPECTION_MODE=
|
||||||
KEEP_GOING=0
|
KEEP_GOING=0
|
||||||
RUN_ARMCC=1
|
RUN_ARMCC=1
|
||||||
|
|
||||||
|
@ -131,7 +132,11 @@ usage()
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $0 [OPTION]...
|
Usage: $0 [OPTION]...
|
||||||
-h|--help Print this help.
|
Run mbedtls release validation tests.
|
||||||
|
|
||||||
|
Special options:
|
||||||
|
-h|--help Print this help and exit.
|
||||||
|
--list-components List available test components and exit.
|
||||||
|
|
||||||
General options:
|
General options:
|
||||||
-f|--force Force the tests to overwrite any modified files.
|
-f|--force Force the tests to overwrite any modified files.
|
||||||
|
@ -257,6 +262,7 @@ pre_parse_command_line () {
|
||||||
--gnutls-serv) shift; GNUTLS_SERV="$1";;
|
--gnutls-serv) shift; GNUTLS_SERV="$1";;
|
||||||
--help|-h) usage; exit;;
|
--help|-h) usage; exit;;
|
||||||
--keep-going|-k) KEEP_GOING=1;;
|
--keep-going|-k) KEEP_GOING=1;;
|
||||||
|
--list-components) INTROSPECTION_MODE=list_components;;
|
||||||
--memory|-m) MEMORY=1;;
|
--memory|-m) MEMORY=1;;
|
||||||
--no-armcc) RUN_ARMCC=0;;
|
--no-armcc) RUN_ARMCC=0;;
|
||||||
--no-force) FORCE=0;;
|
--no-force) FORCE=0;;
|
||||||
|
@ -1143,6 +1149,18 @@ run_component () {
|
||||||
pre_check_environment
|
pre_check_environment
|
||||||
pre_initialize_variables
|
pre_initialize_variables
|
||||||
pre_parse_command_line "$@"
|
pre_parse_command_line "$@"
|
||||||
|
|
||||||
|
case "$INTROSPECTION_MODE" in
|
||||||
|
list_components)
|
||||||
|
components=
|
||||||
|
newline='
|
||||||
|
'
|
||||||
|
run_component () {
|
||||||
|
components="${components}${newline}${1}"
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
pre_check_git
|
pre_check_git
|
||||||
build_status=0
|
build_status=0
|
||||||
if [ $KEEP_GOING -eq 1 ]; then
|
if [ $KEEP_GOING -eq 1 ]; then
|
||||||
|
@ -1156,6 +1174,8 @@ pre_print_configuration
|
||||||
pre_check_tools
|
pre_check_tools
|
||||||
pre_print_tools
|
pre_print_tools
|
||||||
cleanup
|
cleanup
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Small things
|
# Small things
|
||||||
run_component component_check_recursion
|
run_component component_check_recursion
|
||||||
|
@ -1226,4 +1246,11 @@ run_component component_check_python_files
|
||||||
run_component component_check_generate_test_code
|
run_component component_check_generate_test_code
|
||||||
|
|
||||||
# We're done.
|
# We're done.
|
||||||
|
case "$INTROSPECTION_MODE" in
|
||||||
|
list_components)
|
||||||
|
echo "$components" | sort
|
||||||
|
;;
|
||||||
|
*)
|
||||||
post_report
|
post_report
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in a new issue