www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11214] New: Coverage report not output if not run from source dir

http://d.puremagic.com/issues/show_bug.cgi?id=11214

           Summary: Coverage report not output if not run from source dir
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: luis luismarques.eu


--- Comment #0 from Luís Marques <luis luismarques.eu> 2013-10-09 20:30:04 PDT
---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 09 2013