Permalink
Browse files

Fixed gcov/lcov

  • Loading branch information...
1 parent df89da3 commit 3a609efe6b772721db16738b507299c07c552cd9 @jaytaph jaytaph committed Dec 1, 2012
Showing with 14 additions and 8 deletions.
  1. +2 −2 configure.in
  2. +12 −6 coverage.sh
View
@@ -58,9 +58,9 @@ AM_CONDITIONAL(PARSEDEBUG, test x"$parsedebug" = x"true")
#gcov
-AC_ARG_ENABLE(coverage,
+AC_ARG_ENABLE(gcov,
AC_HELP_STRING([--enable-gcov],
- [turn on test coverage @<:@default=no@:>@]), [enable_cov=$enableval],[enable_cov="no"])
+ [turn on test coverage @<:@default=no@:>@]), [enable_coverage=$enableval],[enable_coverage="no"])
if test "x$enable_coverage" = "xyes"; then
if test "x$ac_compiler_gnu" != "xyes"; then
View
@@ -1,7 +1,13 @@
#!/bin/sh
-gcov main.c
-lcov -c -d -o . -o coverage.base
-lcov -c -d . -o .coverage.base
-lcov -c -d . -o .coverage.run
-lcov -d . -a .coverage.base -a .coverage.run -o .coverage.total
-genhtml --no-branch-coverage -o html .coverage.total
+
+#
+# Make sure to compile with ./configure --enable-gcov --enable-debug
+#
+BASEPATH=`pwd`/src
+
+gcov -p src/main/saffire.c
+#lcov --capture --directory --output-file coverage.bas
+lcov --capture --initial --directory src --output-file .coverage.base --base $BASEPATH
+lcov --capture --directory src --output-file .coverage.run --base $BASEPATH
+lcov --directory src --add-tracefile .coverage.base --add-tracefile .coverage.run --output-file .coverage.total --base $BASEPATH
+genhtml --no-branch-coverage --output-directory html .coverage.total --prefix $BASEPATH

0 comments on commit 3a609ef

Please sign in to comment.