takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

UnitTestTool Class Reference

UnitTestTool Class Reference

Public Member Functions

def __init__
def create_makefiles
def build_tests
def run_tests
def prepare_build_directory

Detailed Description

Unit test tool to:
    - prepare build directory
    - create makefiles
    - build unit tests
    - run unit tests
    - generate code coverage reports

Definition at line 33 of file UNITTESTS/unit_test/test.py.


Constructor & Destructor Documentation

def __init__ (   self,
  make_program = None 
)
Constructor

Keyword arguments:
make_program - Make tool to use

Definition at line 43 of file UNITTESTS/unit_test/test.py.


Member Function Documentation

def build_tests (   self )
Build unit tests and libraries to be tested.

Definition at line 102 of file UNITTESTS/unit_test/test.py.

def create_makefiles (   self,
  path_to_src = None,
  generator = None,
  coverage_output_type = None,
  debug = False 
)
Create Makefiles and prepare targets with CMake.

Keyword arguments:
path_to_src - Path to source directory
generator - Type of Makefiles to generate
coverage_output_type - Generate HTML, XML or both reports
debug - Target debug or release build

Definition at line 57 of file UNITTESTS/unit_test/test.py.

def prepare_build_directory (   self,
  path_to_src = None,
  build_path = None,
  clean = False 
)
Create build directory if not exist and
change current working directory to it

Keyword arguments:
path_to_src - Path to source directory
build_path - Path to build directory
clean - Clean build directory

Definition at line 136 of file UNITTESTS/unit_test/test.py.

def run_tests (   self,
  filter_regex = None 
)
Run unit tests.

Keyword arguments:
filter_regex - Regular expression to select which tests to run

Definition at line 116 of file UNITTESTS/unit_test/test.py.