mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05: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,19 +1149,33 @@ run_component () {
 | 
				
			|||||||
pre_check_environment
 | 
					pre_check_environment
 | 
				
			||||||
pre_initialize_variables
 | 
					pre_initialize_variables
 | 
				
			||||||
pre_parse_command_line "$@"
 | 
					pre_parse_command_line "$@"
 | 
				
			||||||
pre_check_git
 | 
					
 | 
				
			||||||
build_status=0
 | 
					case "$INTROSPECTION_MODE" in
 | 
				
			||||||
if [ $KEEP_GOING -eq 1 ]; then
 | 
					    list_components)
 | 
				
			||||||
    pre_setup_keep_going
 | 
					        components=
 | 
				
			||||||
else
 | 
					        newline='
 | 
				
			||||||
    record_status () {
 | 
					'
 | 
				
			||||||
        "$@"
 | 
					        run_component () {
 | 
				
			||||||
    }
 | 
					            components="${components}${newline}${1}"
 | 
				
			||||||
fi
 | 
					        }
 | 
				
			||||||
pre_print_configuration
 | 
					        ;;
 | 
				
			||||||
pre_check_tools
 | 
					
 | 
				
			||||||
pre_print_tools
 | 
					    *)
 | 
				
			||||||
cleanup
 | 
					        pre_check_git
 | 
				
			||||||
 | 
					        build_status=0
 | 
				
			||||||
 | 
					        if [ $KEEP_GOING -eq 1 ]; then
 | 
				
			||||||
 | 
					            pre_setup_keep_going
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            record_status () {
 | 
				
			||||||
 | 
					                "$@"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					        pre_print_configuration
 | 
				
			||||||
 | 
					        pre_check_tools
 | 
				
			||||||
 | 
					        pre_print_tools
 | 
				
			||||||
 | 
					        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.
 | 
				
			||||||
post_report
 | 
					case "$INTROSPECTION_MODE" in
 | 
				
			||||||
 | 
					    list_components)
 | 
				
			||||||
 | 
					        echo "$components" | sort
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    *)
 | 
				
			||||||
 | 
					        post_report
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user