all.sh: wrap main code into main() function

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2024-10-03 12:52:05 +02:00
parent e953a7adac
commit 731128ce50

View File

@ -959,43 +959,46 @@ run_component () {
} }
################################################################ ################################################################
#### Main (only function definitions above) #### Main
################################################################ ################################################################
main () {
# Preliminary setup
pre_set_shell_options
pre_check_environment
pre_load_helpers
pre_load_components
pre_initialize_variables
pre_parse_command_line "$@"
# Preliminary setup setup_quiet_wrappers
pre_set_shell_options pre_check_git
pre_check_environment pre_restore_files
pre_load_helpers pre_back_up
pre_load_components
pre_initialize_variables
pre_parse_command_line "$@"
setup_quiet_wrappers build_status=0
pre_check_git if [ $KEEP_GOING -eq 1 ]; then
pre_restore_files pre_setup_keep_going
pre_back_up fi
pre_prepare_outcome_file
pre_print_configuration
pre_check_tools
cleanup
if in_mbedtls_repo; then
pre_generate_files
fi
build_status=0 # Run the requested tests.
if [ $KEEP_GOING -eq 1 ]; then for ((error_test_i=1; error_test_i <= error_test; error_test_i++)); do
pre_setup_keep_going run_component pseudo_component_error_test
fi done
pre_prepare_outcome_file unset error_test_i
pre_print_configuration for component in $RUN_COMPONENTS; do
pre_check_tools run_component "component_$component"
cleanup done
if in_mbedtls_repo; then
pre_generate_files
fi
# Run the requested tests. # We're done.
for ((error_test_i=1; error_test_i <= error_test; error_test_i++)); do post_report
run_component pseudo_component_error_test }
done
unset error_test_i
for component in $RUN_COMPONENTS; do
run_component "component_$component"
done
# We're done. main "$@"
post_report