From c866f8dc9a3b10fb75988a9045bfd68ca2789a15 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 19 Jun 2023 15:35:25 -0500 Subject: [PATCH] doc: Add document describing code coverage testing --- doc/code-coverage-testing.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/code-coverage-testing.txt diff --git a/doc/code-coverage-testing.txt b/doc/code-coverage-testing.txt new file mode 100644 index 00000000..36c4b02a --- /dev/null +++ b/doc/code-coverage-testing.txt @@ -0,0 +1,28 @@ +Code Coverage Testing +===================== + +To enable code coverage testing, the following steps should be performed. + +1. Configure iwd with --enable-gcov --disable-optimization --enable-debug: + cd iwd + ./bootstrap-configure --enable-gcov --disable-optimization + make + +2. To check unit test coverage, run unit tests: + make check + +3. If you want to perform manual testing and see code coverage of the manual + tests, simply run iwd: + src/iwd -d + +3. Optionally run test runner. If you only care about a certain test and how + it affects code coveage, you can pass the autotest to run to test runner + using the '--autotests' command line argument, like so: + tools/test-runner --autotests=testWPA2 --kernel=tools/linux + +4. Obtain the results: + make gcov-report + Open 'gcov/index.html' + +5. Remove gcov output: + make gcov-clean