Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SingleTestRunner Class Reference
Public Member Functions | |
def | __init__ |
def | dump_options |
def | is_shuffle_seed_float |
def | generate_test_summary_by_target |
def | generate_test_summary |
def | test_loop_list_to_dict |
def | get_test_loop_count |
def | delete_file |
def | handle_mut |
def | handle |
def | print_test_result |
def | shape_test_loop_ok_result_count |
def | shape_global_test_loop_result |
def | run_host_test |
def | is_peripherals_available |
def | shape_test_request |
Detailed Description
Object wrapper for single test run which may involve multiple MUTs
Definition at line 136 of file test_api.py.
Constructor & Destructor Documentation
def __init__ | ( | self, | |
_global_loops_count = 1 , |
|||
_test_loops_list = None , |
|||
_muts = {} , |
|||
_clean = False , |
|||
_parser = None , |
|||
_opts = None , |
|||
_opts_db_url = None , |
|||
_opts_log_file_name = None , |
|||
_opts_report_html_file_name = None , |
|||
_opts_report_junit_file_name = None , |
|||
_opts_report_build_file_name = None , |
|||
_opts_report_text_file_name = None , |
|||
_opts_build_report = {} , |
|||
_opts_build_properties = {} , |
|||
_test_spec = {} , |
|||
_opts_goanna_for_mbed_sdk = None , |
|||
_opts_goanna_for_tests = None , |
|||
_opts_shuffle_test_order = False , |
|||
_opts_shuffle_test_seed = None , |
|||
_opts_test_by_names = None , |
|||
_opts_peripheral_by_names = None , |
|||
_opts_test_only_peripheral = False , |
|||
_opts_test_only_common = False , |
|||
_opts_verbose_skipped_tests = False , |
|||
_opts_verbose_test_result_only = False , |
|||
_opts_verbose = False , |
|||
_opts_firmware_global_name = None , |
|||
_opts_only_build_tests = False , |
|||
_opts_parallel_test_exec = False , |
|||
_opts_suppress_summary = False , |
|||
_opts_test_x_toolchain_summary = False , |
|||
_opts_copy_method = None , |
|||
_opts_mut_reset_type = None , |
|||
_opts_jobs = None , |
|||
_opts_waterfall_test = None , |
|||
_opts_consolidate_waterfall_test = None , |
|||
_opts_extend_test_timeout = None , |
|||
_opts_auto_detect = None , |
|||
_opts_include_non_automated = False |
|||
) |
Let's try hard to init this object
Definition at line 177 of file test_api.py.
Member Function Documentation
def delete_file | ( | self, | |
file_path | |||
) |
Remove file from the system
Definition at line 852 of file test_api.py.
def dump_options | ( | self ) |
Function returns data structure with common settings passed to SingelTestRunner It can be used for example to fill _extra fields in database storing test suite single run data Example: data = self.dump_options() or data_str = json.dumps(self.dump_options())
Definition at line 298 of file test_api.py.
def generate_test_summary | ( | self, | |
test_summary, | |||
shuffle_seed = None |
|||
) |
Prints well-formed summary with results (SQL table like) table shows target x test results matrix across
Definition at line 782 of file test_api.py.
def generate_test_summary_by_target | ( | self, | |
test_summary, | |||
shuffle_seed = None |
|||
) |
Prints well-formed summary with results (SQL table like) table shows text x toolchain test result matrix
Definition at line 734 of file test_api.py.
def get_test_loop_count | ( | self, | |
test_id | |||
) |
This function returns no. of loops per test (deducted by test_id_. If test is not in list of redefined loop counts it will use default value.
Definition at line 843 of file test_api.py.
def handle | ( | self, | |
test_spec, | |||
target_name, | |||
toolchain_name, | |||
test_loops = 1 |
|||
) |
Function determines MUT's mbed disk/port and copies binary to target.
Definition at line 1011 of file test_api.py.
def handle_mut | ( | self, | |
mut, | |||
data, | |||
target_name, | |||
toolchain_name, | |||
test_loops = 1 |
|||
) |
Test is being invoked for given MUT.
Definition at line 864 of file test_api.py.
def is_peripherals_available | ( | self, | |
target_mcu_name, | |||
peripherals = None |
|||
) |
Checks if specified target should run specific peripheral test case defined in MUTs file
Definition at line 1192 of file test_api.py.
def is_shuffle_seed_float | ( | self ) |
return true if function parameter can be converted to float
Definition at line 328 of file test_api.py.
def print_test_result | ( | self, | |
test_result, | |||
target_name, | |||
toolchain_name, | |||
test_id, | |||
test_description, | |||
elapsed_time, | |||
duration | |||
) |
Use specific convention to print test result and related data
Definition at line 1028 of file test_api.py.
def run_host_test | ( | self, | |
name, | |||
image_path, | |||
disk, | |||
port, | |||
duration, | |||
micro = None , |
|||
reset = None , |
|||
reset_tout = None , |
|||
verbose = False , |
|||
copy_method = None , |
|||
program_cycle_s = None |
|||
) |
Function creates new process with host test configured with particular test case. Function also is pooling for serial port activity from process to catch all data printed by test runner and host test during test execution
Definition at line 1062 of file test_api.py.
def shape_global_test_loop_result | ( | self, | |
test_all_result, | |||
waterfall_and_consolidate | |||
) |
Reformats list of results to simple string
Definition at line 1050 of file test_api.py.
def shape_test_loop_ok_result_count | ( | self, | |
test_all_result | |||
) |
Reformats list of results to simple string
Definition at line 1043 of file test_api.py.
def shape_test_request | ( | self, | |
mcu, | |||
image_path, | |||
test_id, | |||
duration = 10 |
|||
) |
Function prepares JSON structure describing test specification
Definition at line 1210 of file test_api.py.
def test_loop_list_to_dict | ( | self, | |
test_loops_str | |||
) |
Transforms test_id=X,test_id=X,test_id=X into dictionary {test_id : test_id_loops_count}
Definition at line 826 of file test_api.py.
Generated on Tue Jul 12 2022 12:22:58 by
