Mbed Host Tests
mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector Class Reference

Select default host_test supervision (replaced after auto detection) More...

Inheritance diagram for mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector:
mbed_host_tests.host_tests_runner.host_test.DefaultTestSelectorBase mbed_host_tests.host_tests_runner.host_test.Test mbed_host_tests.host_tests_runner.host_test.HostTestResults object

Public Member Functions

def __init__ (self, options)
 ctor More...
 
def is_host_test_obj_compatible (self, obj_instance)
 Check if host test object loaded is actually host test class derived from 'mbed_host_tests.BaseHostTest()' Additionaly if host test class implements custom ctor it should call BaseHostTest().__Init__() More...
 
def run_test (self)
 This function implements key-value protocol state-machine. More...
 
def execute (self)
 Test runner for host test. More...
 
def match_log (self, line)
 
- Public Member Functions inherited from mbed_host_tests.host_tests_runner.host_test.Test
def run (self)
 
def setup (self)
 Setup and check if configuration for test is correct. More...
 
def notify (self, msg)
 On screen notification function. More...
 
def print_result (self, result)
 Test result unified printing function. More...
 
def finish (self)
 
def get_hello_string (self)
 
- Public Member Functions inherited from mbed_host_tests.host_tests_runner.host_test.HostTestResults
def enum (self, **enums)
 
def __init__ (self)
 
def get_test_result_int (self, test_result_str)
 Maps test result string to unique integer. More...
 
def __getitem__ (self, test_result_str)
 Returns numerical result code. More...
 

Public Attributes

 options
 
 logger
 
 registry
 
 compare_log
 
 serial_output_file
 
 compare_log_idx
 
 test_supervisor
 
 client_version
 
- Public Attributes inherited from mbed_host_tests.host_tests_runner.host_test.Test
 mbed
 
- Public Attributes inherited from mbed_host_tests.host_tests_runner.host_test.HostTestResults
 TestResults
 
 TestResultsList
 

Static Public Attributes

string RESET_TYPE_SW_RST = "software_reset"
 
string RESET_TYPE_HW_RST = "hardware_reset"
 

Detailed Description

Select default host_test supervision (replaced after auto detection)

Definition at line 51 of file host_test_default.py.

Constructor & Destructor Documentation

◆ __init__()

def mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.__init__ (   self,
  options 
)

Member Function Documentation

◆ execute()

def mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.execute (   self)

Test runner for host test.

   @details This function will start executing test and forward test result via serial port
            to test suite. This function is sensitive to work-flow flags such as --skip-flashing,
            --skip-reset etc.
            First function will flash device with binary, initialize serial port for communication,
            reset target. On serial port handshake with test case will be performed. It is when host
            test reads property data from serial port (sent over serial port).
            At the end of the procedure proper host test (defined in set properties) will be executed
            and test execution timeout will be measured.

Definition at line 529 of file host_test_default.py.

◆ is_host_test_obj_compatible()

def mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.is_host_test_obj_compatible (   self,
  obj_instance 
)

Check if host test object loaded is actually host test class derived from 'mbed_host_tests.BaseHostTest()' Additionaly if host test class implements custom ctor it should call BaseHostTest().__Init__()

Parameters
obj_instanceInstance of host test derived class
Returns
True if obj_instance is derived from mbed_host_tests.BaseHostTest() and BaseHostTest.__init__() was called, else return False

Definition at line 119 of file host_test_default.py.

◆ match_log()

def mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.match_log (   self,
  line 
)
Matches lines from compare log with the target serial output. Compare log lines are matched in seq using index
self.compare_log_idx. Lines can be strings to be matched as is or regular expressions.

:param line:
:return:

Definition at line 576 of file host_test_default.py.

◆ run_test()

def mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.run_test (   self)

This function implements key-value protocol state-machine.

Handling of all events and connector are handled here.

Returns
Return self.TestResults.RESULT_* enum

Definition at line 147 of file host_test_default.py.

Member Data Documentation

◆ client_version

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.client_version

Definition at line 176 of file host_test_default.py.

◆ compare_log

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.compare_log

Definition at line 111 of file host_test_default.py.

◆ compare_log_idx

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.compare_log_idx

Definition at line 116 of file host_test_default.py.

◆ logger

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.logger

Definition at line 61 of file host_test_default.py.

◆ options

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.options

Definition at line 59 of file host_test_default.py.

◆ registry

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.registry

Definition at line 63 of file host_test_default.py.

◆ RESET_TYPE_HW_RST

string mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.RESET_TYPE_HW_RST = "hardware_reset"
static

Definition at line 54 of file host_test_default.py.

◆ RESET_TYPE_SW_RST

string mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.RESET_TYPE_SW_RST = "software_reset"
static

Definition at line 53 of file host_test_default.py.

◆ serial_output_file

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.serial_output_file

Definition at line 115 of file host_test_default.py.

◆ test_supervisor

mbed_host_tests.host_tests_runner.host_test_default.DefaultTestSelector.test_supervisor

Definition at line 174 of file host_test_default.py.


The documentation for this class was generated from the following file: