Be sure to have installed:
- CMake >= 3.10
- CMocka >= 1.1.5
and for code coverage generation:
- lcov >= 1.14
In tests/unit folder, compile with:
cmake -Bbuild -H. && make -C buildand run tests with:
CTEST_OUTPUT_ON_FAILURE=1 make -C build testTo get more verbose output, use:
CTEST_OUTPUT_ON_FAILURE=1 make -C build test ARGS="-V"Or also directly with:
CTEST_OUTPUT_ON_FAILURE=1 build/test_ioJust execute in tests/unit folder:
./gen_coverage.shit will output coverage.total and coverage/ folder with HTML details (in coverage/index.html).