From e6be19cdf7f2f409e86bdb5c8f037f09483cca54 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 10 Feb 2011 08:23:11 +0100 Subject: [PATCH] * HACKING (Running coverage tests): New section. --- ChangeLog | 4 ++++ HACKING | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index c7c3aa21b..1ad2d76ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-02-10 Alexandre Duret-Lutz + + * HACKING (Running coverage tests): New section. + 2011-02-09 Alexandre Duret-Lutz Previous patch did not work on MacOS X, and I don't have shell diff --git a/HACKING b/HACKING index 0d96d366d..ab13d735c 100644 --- a/HACKING +++ b/HACKING @@ -90,6 +90,30 @@ shorthand "libtool --mode=execute" as "libtool execute" or even "libtool e". +Running coverage tests +---------------------- + +First, compile (and link) Spot with coverage enabled. + + % ./configure CXX='gcc --coverage' + % make + +Then run the test suite (or any program you want to study). + + % make check + +Executing programs using Spot will generate a lot of *.gc* files +everywhere. Collect these using lcov: + + % lcov --capture --directory src --output spot.info + +Finally generate a coverage report in HTML: + + % genhtml --legend --demangle-cpp --output-directory html spot.info + +This should create the directory html/. + + Coding conventions: ===================