Re: Generating code coverage reports

2008-11-03 Thread Ludovic Courtès
Simon Josefsson <[EMAIL PROTECTED]> writes: > Yes, but it seems that --coverage is passed to the command line to link > applications with CFLAGS: > > [EMAIL PROTECTED]:~/src/libidn/src master$ rm idn > [EMAIL PROTECTED]:~/src/libidn/src master$ make CFLAGS="-g --coverage" > make all-am > make[1]:

Re: Generating code coverage reports

2008-11-03 Thread Simon Josefsson
[EMAIL PROTECTED] (Ludovic Courtès) writes: >> Hi Ludovic. Thanks, I pushed this patch. Adding anything to LDFLAGS >> doesn't seem to be required though? > > According to the doc (info "(gcc)Debugging Options") it is required. > See also this example (with GCC 4.2.4): > > $ cat > t.c < int m

Re: Generating code coverage reports

2008-11-03 Thread Ludovic Courtès
Hi Simon, Simon Josefsson <[EMAIL PROTECTED]> writes: > Hi Ludovic. Thanks, I pushed this patch. Adding anything to LDFLAGS > doesn't seem to be required though? According to the doc (info "(gcc)Debugging Options") it is required. See also this example (with GCC 4.2.4): $ cat > t.c < Btw, i

Re: Generating code coverage reports

2008-11-03 Thread Simon Josefsson
ludo-mXXj517/[EMAIL PROTECTED] (Ludovic Courtès) writes: > Hi Simon, > > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> +COVERAGE_CCOPTS ?= "-g -fprofile-arcs -ftest-coverage" > > Looks to me that `--coverage' is more appropriate as it adds all `-f' > options that are needed, so it's potentially

Re: Generating code coverage reports

2008-11-03 Thread Ludovic Courtès
Hi Simon, Simon Josefsson <[EMAIL PROTECTED]> writes: > +COVERAGE_CCOPTS ?= "-g -fprofile-arcs -ftest-coverage" Looks to me that `--coverage' is more appropriate as it adds all `-f' options that are needed, so it's potentially more "future-proof". Also, LDFLAGS must be modified to do either `-l

Re: Generating code coverage reports

2008-10-28 Thread Simon Josefsson
jemarch-mXXj517/[EMAIL PROTECTED] writes: > Hi Simon. > >I was inspired by gnupdf's code coverage reports: > >http://www.gnupdf.org/prmgt/coverage/ > >So I looked into how to integrate a script to generate them for some of >my projects. I couldn't think of how to implement this as

Re: Generating code coverage reports

2008-10-28 Thread jemarch
> Does that make sense? Oh, I am not that familiar with how the profiling code actually works, thanks for explaining. I haven't found anything in gnupdf that works around the problem, so maybe gnupdf is affected as well, but I am not certain. The stats stored in the .gcda files a

Re: [pdf-devel] Generating code coverage reports

2008-10-28 Thread jemarch
Hi Simon. I was inspired by gnupdf's code coverage reports: http://www.gnupdf.org/prmgt/coverage/ So I looked into how to integrate a script to generate them for some of my projects. I couldn't think of how to implement this as a gnulib module, but I wrote rules for maintainer-m

Re: Generating code coverage reports

2008-10-28 Thread Ralf Wildenhues
* Ludovic Courtès wrote on Tue, Oct 28, 2008 at 07:10:52PM CET: > Ralf Wildenhues <[EMAIL PROTECTED]> writes: > > > FWIW, IIRC then the directory handling of the files was only fixed to be > > sane rather recently in the GCC tree (I guess 4.4 only). > > By "directory handling", you mean the locat

Re: Generating code coverage reports

2008-10-28 Thread Ludovic Courtès
Hi Ralf, Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Hello Ludovic, Simon, > > * Ludovic Courtès wrote on Tue, Oct 28, 2008 at 05:48:12PM CET: >> >> Let me explain this. Suppose you have tests T1 and T2: >> >> * T1 uses code from foo.c and t1.c; >> * T2 uses code from foo.c and t2.c. >>

Re: Generating code coverage reports

2008-10-28 Thread Ralf Wildenhues
Hello Ludovic, Simon, * Ludovic Courtès wrote on Tue, Oct 28, 2008 at 05:48:12PM CET: > > Let me explain this. Suppose you have tests T1 and T2: > > * T1 uses code from foo.c and t1.c; > * T2 uses code from foo.c and t2.c. > > Running "make check" runs T1, then T2: > > * T1 is run, prod

Re: Generating code coverage reports

2008-10-28 Thread Simon Josefsson
[EMAIL PROTECTED] (Ludovic Courtès) writes: > Hi, > > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> build-coverage: >> make CFLAGS=$(COVERAGE_OPTS) CXXFLAGS=$(COVERAGE_OPTS) VALGRIND= >> make CFLAGS=$(COVERAGE_OPTS) CXXFLAGS=$(COVERAGE_OPTS) VALGRIND= check >> mkdir -p doc/covera

Re: Generating code coverage reports

2008-10-28 Thread Ludovic Courtès
Hi, Simon Josefsson <[EMAIL PROTECTED]> writes: > build-coverage: > make CFLAGS=$(COVERAGE_OPTS) CXXFLAGS=$(COVERAGE_OPTS) VALGRIND= > make CFLAGS=$(COVERAGE_OPTS) CXXFLAGS=$(COVERAGE_OPTS) VALGRIND= check > mkdir -p doc/coverage > lcov --directory . --output-file doc/cove

Generating code coverage reports

2008-10-28 Thread Simon Josefsson
FYI, I was inspired by gnupdf's code coverage reports: http://www.gnupdf.org/prmgt/coverage/ So I looked into how to integrate a script to generate them for some of my projects. I couldn't think of how to implement this as a gnulib module, but I wrote rules for maintainer-makefile's 'cfg.mk'.