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.
Comment #1 by issues.dlang — 2013-03-15T10:56:27Z
Oooh. Nice idea.
Comment #2 by bugzilla — 2013-03-15T14:54:21Z
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.