dmd test coverage
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Fri Nov 28 13:55:26 PST 2014
On Fri, Nov 28, 2014 at 12:42:06PM -0800, Walter Bright via Digitalmars-d wrote:
> On 11/28/2014 11:35 AM, H. S. Teoh via Digitalmars-d wrote:
> >On Fri, Nov 28, 2014 at 11:32:25AM -0800, H. S. Teoh via Digitalmars-d wrote:
[...]
> >>Also, don't I have to first compile dmd with --coverage and run the
> >>test suite before it has the coverage data??
> >[...]
> >
> >Which I had tried (make -f posix.mak -j6 MODEL=64 CFLAGS=--coverage),
> >but the compilation aborts with:
> >
> > inifile.c:101:3: error: #error SYSCONFDIR not defined
> >
> >which goes away when --coverage is not specified. What gives?
>
> I don't know. Haven't tried it in a while, likely it is suffering from
> bit rot.
Nevermind, I found the reason. Make overwrites CFLAGS even if you
intended to append to it with `make CFLAGS+=--coverage`, so the other
necessary CFLAGS were missing. Gah.
Eventually I saw that specifying DEBUG=1 and ENABLE_PROFILING=1 causes
the makefile to do the Right Thing(tm), so that's what I did. After
that, make gcov does its job. Except it only works if you're in
dmd/src, since the top-level makefile has no idea what you're talking
about, in spite of the fact that the two makefiles are obviously
connected. I hate make so much[1]. :-(
[1] http://www.conifersystems.com/whitepapers/gnu-make/
T
--
People demand freedom of speech to make up for the freedom of thought which they avoid. -- Soren Aabye Kierkegaard (1813-1855)
More information about the Digitalmars-d
mailing list