On 23/02/2014 00:33, Joshua Cranmer 🐧 wrote:
On 2/22/2014 5:57 PM, Gregory Szorc wrote:
On Feb 22, 2014, at 8:18, Kyle Huey <m...@kylehuey.com> wrote:
If you needed another reason to follow the style guide:
https://www.imperialviolet.org/2014/02/22/applebug.html
Code coverage would have caught this as well.
Actually, it probably wouldn't. The code after the goto which was
unreachable would likely have been deleted from the CFG, certainly so in
the optimized case. As deleted code, it wouldn't be emitted as being
possibly executed, so you could still achieve 100% line coverage in
those scenarios even being totally unable to reach lines of code.
The time investment into 100% line and branch coverage is debatable.
But you can't argue that code coverage has its place, especially for
high-importance code such as crypto.
AFAIK, our automation currently does not collect code coverage from
any test suite. Should that change?
I've tried getting code coverage working on our automation in the past.
So far, it only works at all on Linux/Linux 32-bit. Windows is in a
horrible situation to try to collect code coverage, and OS X and clang
crop up other issues. I've not even attempted our Android or B2G builds.
Also, 20-50% of our code is JS. There are extremely few tools that
support JS code coverage, and none of them are capable of handling
Mozilla's JS usage.
However, I'd imagine that it wouldn't be terribly hard to write a
runtime CC tool with the current JSD2 APIs (famous last words, of
course...). It'd slow things down considerably to have the debugger
running all the time, but probably no more than the difference between
debug and opt (and I don't know of any debug-only JS code in fx frontend
so we could just run it against an opt build - but I could be surprised...).
Is there an accepted reporting format that'd be appropriate for output
from such a tool? Perhaps the devtools folks could be interested in
helping us out with something like this? I won't have time to look until
after Australis has sailed.
~ Gijs
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform