(opts, args) = parser.parse_args() # Print scrip version if opts.version: print parser.description print parser.epilog print "Version %d.%d"% get_version() exit(0) # Print summary / information about automation test status if opts.test_automation_report: print get_avail_tests_summary_table() exit(0) if opts.db_url and opts.verbose_test_configuration_only: detect_database_verbose(opts.db_url) exit(0) # Print summary / information about automation test status if opts.test_case_report: test_case_report_cols = ['id', 'automated', 'description', 'peripherals', 'host_test', 'duration', 'source_dir'] print get_avail_tests_summary_table(cols=test_case_report_cols, result_summary=False, join_delim='\n') exit(0) # Only prints matrix of supported toolchains if opts.supported_toolchains: print mcu_toolchain_matrix(platform_filter=opts.general_filter_regex) exit(0) # Open file with test specification # test_spec_filename tells script which targets and their toolchain(s)
parser = get_default_test_options_parser() parser.description = """This script allows you to run mbed defined test cases for particular MCU(s) and corresponding toolchain(s).""" parser.epilog = """Example: singletest.py -i test_spec.json -M muts_all.json""" (opts, args) = parser.parse_args() # Print scrip version if opts.version: print parser.description print parser.epilog print "Version %d.%d" % get_version() exit(0) if opts.db_url and opts.verbose_test_configuration_only: detect_database_verbose(opts.db_url) exit(0) # Print summary / information about automation test status if opts.test_automation_report: print get_avail_tests_summary_table( platform_filter=opts.general_filter_regex) exit(0) # Print summary / information about automation test status if opts.test_case_report: test_case_report_cols = [ 'id', 'automated', 'description', 'peripherals', 'host_test', 'duration', 'source_dir' ] print get_avail_tests_summary_table(