diff options
author | Nico Weber <thakis@chromium.org> | 2015-01-21 01:39:27 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-01-21 01:39:27 (GMT) |
commit | 4e6f7e16c31f398828fcd417b45ea6c722f74198 (patch) | |
tree | 1661a1abbdfd185b87bbc6b9bce3ac7488507575 /HACKING.md | |
parent | 7617494c1e0e66f6957f43822edca1759ca1303b (diff) | |
download | Ninja-4e6f7e16c31f398828fcd417b45ea6c722f74198.zip Ninja-4e6f7e16c31f398828fcd417b45ea6c722f74198.tar.gz Ninja-4e6f7e16c31f398828fcd417b45ea6c722f74198.tar.bz2 |
Document how to run gcov on ninja.
Diffstat (limited to 'HACKING.md')
-rw-r--r-- | HACKING.md | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -161,3 +161,19 @@ The trick is to install just the compilers, and not all of Visual Studio, by following [these instructions][win7sdk]. [win7sdk]: http://www.kegel.com/wine/cl-howto-win7sdk.html + +### Using gcov + +Do a clean debug build with the right flags: + + CFLAGS=-coverage LDFLAGS=-coverage ./configure.py --debug + ninja -t clean ninja_test && ninja ninja_test + +Run the test binary to generate `.gcda` and `.gcno` files in the build +directory, then run gcov on the .o files to generate `.gcov` files in the +root directory: + + ./ninja_test + gcov build/*.o + +Look at the generated `.gcov` files directly, or use your favorit gcov viewer. |