[meta] Write tests for files with zero coverage
Categories
(Testing :: Code Coverage, enhancement)
Tracking
(Not tracked)
People
(Reporter: marco, Unassigned)
References
(Depends on 22 open bugs, Blocks 1 open bug, )
Details
(Keywords: meta)
Files from the zero coverage files report (https://marco-c.github.io/code-coverage-reports/) are often dead code and sometimes they are simply not tested. Untested files are clearly very risky. If we are never executing them on automation, there's a high chance of unnoticed regressions. This bug will track adding at least basic tests for these files.
Reporter | ||
Updated•7 years ago
|
Reporter | ||
Updated•6 years ago
|
Comment 1•5 years ago
|
||
Adding dependency on running gdb tests in automation, though I don't know how likely it is for them to learn how to do coverage builds.
Comment 2•4 years ago
|
||
Hi, from code coverage analysis, it show that this code has 0% test coverage [1], however, we do have a test for that [2]. Do we have a way to modify this coverage data or explicitly mark code as covered?
Thank you.
[1] https://coverage.moz.tools/#revision=latest&path=widget%2Fcocoa%2FMediaHardwareKeysEventSourceMacMediaCenter.mm&view=file
[2] https://searchfox.org/mozilla-central/source/dom/media/mediacontrol/tests/gtest/TestMediaKeysEventMediaCenter.mm
Reporter | ||
Comment 3•4 years ago
|
||
(In reply to Alastor Wu [:alwu] from comment #2)
Hi, from code coverage analysis, it show that this code has 0% test coverage [1], however, we do have a test for that [2]. Do we have a way to modify this coverage data or explicitly mark code as covered?
Thank you.
[1] https://coverage.moz.tools/#revision=latest&path=widget%2Fcocoa%2FMediaHardwareKeysEventSourceMacMediaCenter.mm&view=file
[2] https://searchfox.org/mozilla-central/source/dom/media/mediacontrol/tests/gtest/TestMediaKeysEventMediaCenter.mm
We are not running tests in coverage mode on OS X, that explains it :)
See also bug 1599847, adding a skiplist is tracked in https://github.com/mozilla/code-coverage/issues/336.
Updated•2 years ago
|
Description
•