www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9726] New: Add minimum % coverage required for -cov testing

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726

           Summary: Add minimum % coverage required for -cov testing
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bugzilla digitalmars.com


--- Comment #0 from Walter Bright <bugzilla digitalmars.com> 2013-03-14
23:41:46 PDT ---
This is a management feature.

Adding an optional value to the -cov switch:

    -cov=78

means that the coverage testing must cover 78% or more of the lines, else a
non-zero exit status is given when the program is run. Values accepted will be
in the range 0..100.

This means a minimum coverage "bar" can be set in the build/test system, and
automatically tested. The current method requires manually looking at the
coverage output, or writing a script to test it, which of course is too much
bother and nobody does it.

If there are multiple modules under -cov, each must meet the bar.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com


--- Comment #1 from Jonathan M Davis <jmdavisProg gmx.com> 2013-03-15 10:56:27
PDT ---
Oooh. Nice idea.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726



--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2013-03-15
14:54:21 PDT ---
For example,

    dmd test.d -unittest -cov=90 -run

should compile and run the unittests in test.d, and the program should fail if
it doesn't have at least 90% coverage.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 15 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726



--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2013-03-17
15:45:53 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1759

https://github.com/D-Programming-Language/druntime/pull/450

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726



--- Comment #4 from github-bugzilla puremagic.com 2013-03-18 14:17:59 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/453e4b461a36f751e27caab84dd76679021bca16
fix Issue 9726 - Add minimum % coverage required for -cov testing

https://github.com/D-Programming-Language/druntime/commit/6e298fd4c6dde94c646cfac91dd514787ed3179c
Merge pull request #450 from WalterBright/fix9726

fix Issue 9726 - Add minimum % coverage required for -cov testing

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9726



--- Comment #5 from github-bugzilla puremagic.com 2013-03-18 23:36:58 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9064bbb2366265aa87a99105429b5f8798ae6638
fix Issue 9726 - Add minimum % coverage required for -cov testing

https://github.com/D-Programming-Language/dmd/commit/9c78bb2ec4fdc1b44858f31d514d6370a824612b
Merge pull request #1759 from WalterBright/fix9726

fix Issue 9726 - Add minimum % coverage required for -cov testing

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