Project

General

Profile

Actions

Task #2141

closed

Code should be compiled in debug mode for coverage tests

Added by Alex Afanasyev about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by Junxiao Shi about 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
Actions #2

Updated by Alex Afanasyev about 10 years ago

I prefer the first approach: let --with-coverage imply --debug

Actions #3

Updated by Alex Afanasyev about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
Actions #4

Updated by Alex Afanasyev about 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.

Actions #5

Updated by Junxiao Shi about 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.

Actions #6

Updated by Alex Afanasyev about 10 years ago

Yeah. Detection is possible. I'll make an update.

Actions #7

Updated by Junxiao Shi about 10 years ago

  • Status changed from In Progress to Closed
  • Assignee set to Alex Afanasyev
  • % Done changed from 50 to 100
Actions

Also available in: Atom PDF