code-coverage-testing.txt (826B)
1 Code Coverage Testing 2 ===================== 3 4 To enable code coverage testing, the following steps should be performed. 5 6 1. Configure iwd with --enable-gcov --disable-optimization --enable-debug: 7 cd iwd 8 ./bootstrap-configure --enable-gcov --disable-optimization 9 make 10 11 2. To check unit test coverage, run unit tests: 12 make check 13 14 3. If you want to perform manual testing and see code coverage of the manual 15 tests, simply run iwd: 16 src/iwd -d 17 18 3. Optionally run test runner. If you only care about a certain test and how 19 it affects code coveage, you can pass the autotest to run to test runner 20 using the '--autotests' command line argument, like so: 21 tools/test-runner --autotests=testWPA2 --kernel=tools/linux 22 23 4. Obtain the results: 24 make gcov-report 25 Open 'gcov/index.html' 26 27 5. Remove gcov output: 28 make gcov-clean