Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 1.11 KB

Unit_Test.md

File metadata and controls

30 lines (17 loc) · 1.11 KB

Note: auto-generated from comments in: ./support/Unit_Test.cmake

Unit_Test.cmake:

Testing does not properly handle unit test dependencies in some versions of CMake. Therefore, we follow a standard workaround from CMake users and create a "check" target used to run the tests while rolling-up the dependencies properly. Thus tests may be run using make check as opposed to the standard CMake call. The CMake test support functions are still used.

Function unit_test_component_autocoder:

Performs registration of the autocoder step for the generation of GTestBase.hpp, GTestBase.cpp, TesterBase.cpp, and TesterBase.hpp. These autocoding steps automate, and keep up-to-date the above files saving time.

  • EXE_NAME: name of exe (unit test exe)
  • SOURCE_FILES: source files to provide for autocoding

Function generate_ut:

Generates the actual unit test, dependencies, and call the autocoder.

  • UT_EXE_NAME: name of the UT executable to be created
  • UT_SOURCES_INPUT: sources to split into source and autocoder file
  • MOD_DEPS_INPUT: dependencies split into thread and module dependencies