Empty LST files?
Basile B. via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 31 01:29:47 PDT 2016
On Sunday, 31 July 2016 at 01:10:40 UTC, Thalamus wrote:
> I'm running into a problem where when I specify -cov in the DMD
> compiler command, the coverage LST files are generated, but
> they're all empty. Has anyone else run into this before? My
> command line is:
>
> dmd -m64 -gc -debug -w -wi -cov -X -Xf"obj\Unit.json" -I\
> -deps="obj\Unit.dep" -c -odobj\Unit.build.rsp Interfaces.obj
> Invokers.obj (plus a whole lot of other .objs)
>
> This is for a test EXE. I thought there may be some trouble
> when generating files for the .d from the .obj files, but even
> the .d files local to the test EXE end up with empty LST files.
>
> Any idea what I'm doing wrong?
Yes, what's going wrong is quite obvious. Coverage files are
generated at run-time by the target application and not by the
compiler at compile-time.
In your options I can see that you generate an object file. You
should rather compile for running the unittests: e.g:
-main -unittest -cov
and then execute the target application to generate the LST.
More information about the Digitalmars-d-learn
mailing list