hi,

as usual, i might add ;)

i'm trying to integrate lcov at least a bit. i've gotten this far, and 
it completely doesn't work:

dnl LCOV
dnl ====
enable_lcov=no
AC_ARG_ENABLE([lcov],
    [AS_HELP_STRING([--enable-lcov[=output-directory]], [enable coverage data 
generation using LCOV (GCC only) [default=no]])],
    [enable_lcov=$enableval])

AS_IF([test "x$enable_lcov" != "xno"],
    AX_CFLAGS_GCC_OPTION(-fprofile-arcs -ftest-coverage)
    AS_IF([test "x$enable_lcov" = "xyes"],
        [lcov_output_directory="coverage-report"],
        [lcov_output_directory="$enable_lcov"]
    )
    AC_SUBST(lcov_output_directory)
)

what i'm after is --enable-lcov=(no|yes|directory), with no being the 
default (which doesn't affect anything).

"yes" and <directory> should add -fprofile-arcs -ftest-coverage to 
CFLAGS, and give me a variable that is usable in Makefile.am; in case 
of "yes", some default string, in other cases the argument string.

the Makefile.am bit is like this:

coverage-reset:
        find . -type f -name '*.gcda' -exec rm -f '{}' ';'
        lcov --directory . --zerocounters

coverage:
        rm -rf coverage ${lcov_output_directory}
        -mkdir -p coverage ${lcov_output_directory}
        lcov --compat-libtool --capture --directory . --output-file 
coverage/coverage.info
        genhtml --output-directory ${lcov_output_directory} 
coverage/coverage.info

.PHONY: coverage-reset coverage

(open to any alternative ways of achieving this, too)

fyi this is a front-end for gcc-generated coverage data, and produces 
reports like http://dawn.dev.hu/~ice/tmp/coverage-report/ this. quite 
useful, but it would be more useful if such reports could be produced 
by simply enabling a switch (since what i really need is long-ish term 
usage stats by people who use more eye candy than i do).


-- 
[-]

mkdir /nonexistent


-- 
To unsubscribe, send mail to [email protected].

Reply via email to