Closed
Description
Description of defect
We only call add_test
once per test executable, which means each test executable is treated as a single test case by CTest. A test executable usually contains more than one test case. What we actually want to report in the CTest output is the number of test cases executed, not the number of test executables.
Since we use gtest
as our test framework, CMake's GoogleTest
module provides us with the gtest_discover_tests
function, which will work as expected with CTest. We should convert all the add_test
calls to gtest_discover_tests
to get the correct output from CTest.
Target(s) affected by this defect ?
N/A
Toolchain(s) (name and version) displaying this defect ?
N/A
What version of Mbed-os are you using (tag or sha) ?
master
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
N/A
How is this defect reproduced ?
Run unit tests, view CTest console output.