blob: b3674cb2f54d1c4d56aef7ad37a68438f7e06807 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
How to analyze coverage:
1. read HACKING file.
2. gbs build adding --define '_with_coverage 1'
3. take *.o and *.gcno files from compilation (<gbs-build-root>/home/abuild/rpmbuild/BUILD/dbus-1.10.6/dbus/.libs) into a /safe/place
you may also use generated rpm package dbus-coverage-objects.
4. install coverage package (dbus-coverage) on the target
5. run test programs adding LD_LIBRARY_PATH=/usr/lib/dbus-tests/coverage-libs
Data gathering is cumulative, so you can run multiple programs one after another.
Use GCOV_PREFIX and GCOV_PREFIX_STRIP environment variables to set output directory.
If not set, data files (*.gcda) will be generated in /home/abuild/rpmbuild/BUILD/dbus-1.10.6
6. download generated gcda files from the target to /safe/place
7. put source code *.c files together with object files into a /safe/place
8. run gcov /safe/place/*.o
or gcov -r /safe/place/*.o for only local source code output
|