Bug 11214 – Coverage report not output if not run from source dir

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-09T20:30:04Z
Last change time
2024-12-13T18:12:33Z
Assigned to
No Owner
Creator
Luís Marques
Moved to GitHub: dmd#18692 →

Comments

Comment #0 by luis — 2013-10-09T20:30:04Z
A program compiled with DMD does not generate the code coverage report file if the program is not run from the same directory as the source file(s). For instance, this works: ~/test$ dmd -cov test.d && ./test ~/test$ ls *.lst test.lst This does not output the coverage listing: ~/test/sub$ dmd -cov test.d ~/test/sub$ cd .. ~/test$ ./sub/test.d ~/test$ find . -name '*.lst' ~/test$ This attempt at a workaround works, but produces unhelpful listing filenames: ~/test/sub2$ dmd -cov ../sub1/test.d -of../sub1/test ~/test/sub2$ ../sub1/test ~/test/sub2$ ls *.lst zsh: no matches found: *.lst ~/test/sub2$ find . -name '*.lst' ./..-sub1-test.lst
Comment #1 by jrdemail2000-dlang — 2017-04-02T00:09:00Z
It appears that if a relative path is specified on the compiler line, the executable must be run from the directory where the dmd command was issued, preserving the relative path relationship.
Comment #2 by robert.schadek — 2024-12-13T18:12:33Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18692 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB