Code should be compiled in debug mode for coverage tests
Based on https://gcc.gnu.org/onlinedocs/gcc/Gcov-Intro.html#Gcov-Intro, for code coverage we should use debug mode compilation. Right now, testing is done using the optimized mode.
Updated by Alex Afanasyev almost 7 years ago
Unfortunately, I'm not seeing a clean way to implement note-2 approach. During configure stage, code coverage module is loaded after default compiler flags, making it impossible to update
conf.options.debug in coverage.
Loading coverage early has an implication of forcing all configuration tests to be run with code coverage flags, which is not really desirable.
The dirty way is to combine coverage and default-compiler-flags into one, but I don't want to go this direction. At least not right now.