Task #2141
closedCode should be compiled in debug mode for coverage tests
100%
Description
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 Junxiao Shi almost 10 years ago
- Category changed from Integration Tests to Build
Category shall be Build. "Tests" category refers to integration tests.
We should choose between
- let
--with-coverage
imply--debug
, or - raise an error if
--with-coverage
is enabled but--debug
is disabled
Updated by Alex Afanasyev almost 10 years ago
I prefer the first approach: let --with-coverage
imply --debug
Updated by Alex Afanasyev almost 10 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
Updated by Alex Afanasyev almost 10 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.
Updated by Junxiao Shi almost 10 years ago
Could code-coverage tool detect the value of conf.options.debug
?
It should raise an error when code-coverage is enabled but debug is disabled.
Updated by Alex Afanasyev almost 10 years ago
Yeah. Detection is possible. I'll make an update.
Updated by Junxiao Shi almost 10 years ago
- Status changed from In Progress to Closed
- Assignee set to Alex Afanasyev
- % Done changed from 50 to 100