zephyr/subsys/testsuite
Roman Studenikin fdd81f87c2 testsuite: coverage: Add CONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS
Add an option to reset gcov counters before running tests.
This ensures that only code lines triggered by test itself are counted in
the coverage report and all the board initialization code and pre-test
bootstrap is not counted. This is useful when, for example, you are
testing code that is also executed during bootup

Test Plan:
west build -p always -b qemu_x86_64 tests/ztest/base/ -- \
-DCONFIG_COVERAGE=y -DCONFIG_COVERAGE_GCOV=y -DCONFIG_COVERAGE_DUMP=y \
-DCONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS=y
ninja -Cbuild run | tee log.log

Signed-off-by: Roman Studenikin <srv@meta.com>
2024-06-12 14:32:04 +03:00
..
arch unittest: update unittest to hwmv2 2024-03-22 11:51:58 +01:00
boards/unit_testing/unit_testing Bluetooth: Kconfig: Remove BT_NO_DRIVER 2024-06-11 19:42:49 -04:00
busy_sim
coverage testsuite: coverage: Add CONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS 2024-06-12 14:32:04 +03:00
include/zephyr testsuite: interrupt_util: add trigger_irq for VPR CLIC 2024-05-06 19:06:19 +02:00
soc scripts: tests: Blackbox test expansion - platform 2024-03-31 17:37:09 -04:00
ztest testsuite: coverage: Add CONFIG_ZTEST_COVERAGE_RESET_BEFORE_TESTS 2024-06-12 14:32:04 +03:00
CMakeLists.txt testsuite: coverage: allow access to gcov internals 2023-11-29 04:59:47 -08:00
Kconfig testsuite: add dependency to COVERAGE_GCOV_HEAP_SIZE 2024-06-06 20:07:20 -04:00
Kconfig.defconfig