Ceedling icon indicating copy to clipboard operation
Ceedling copied to clipboard

Using gcov:all as default task produces no coverage data.

Open KaSroka opened this issue 9 months ago • 2 comments

I have enabled gcov plugin and added gcov:all as default task in the default config.

  :default_tasks:
    - gcov:all

Running tests as

ceedling

Generates no coverage data or summary.

Running the tasks explicitly:

ceedling gcov:all

Generates coverage data and summary as expected. I would expect gcov:all to be working as expected when used as default task.

KaSroka avatar Mar 28 '25 18:03 KaSroka

@KaSroka I had the same issue. I turned up the verbosity and output to text files using both methods and then did a file comparison. Looks like the configuration is the exact same...

Image

Yet at the end, the :post_build task has differing output:

Image

nicofer00 avatar Apr 03 '25 17:04 nicofer00

https://github.com/ThrowTheSwitch/Ceedling/blob/75cc24bcae331b996299e7e152ace41840e93b3d/plugins/gcov/lib/gcov.rb#L94-L95

The issue is the :post_build default in gcov.rb filtering out if it was literally on the command line 😆

https://github.com/ThrowTheSwitch/Ceedling/blob/75cc24bcae331b996299e7e152ace41840e93b3d/plugins/gcov/lib/gcov.rb#L27

So you dont get any of the :post_build which is responsible for coverage summaries and report generation... 🤦

https://github.com/ThrowTheSwitch/Ceedling/blob/75cc24bcae331b996299e7e152ace41840e93b3d/plugins/gcov/lib/gcov.rb#L93-L124

This is not the desired behavior for configured pipeline where you want to just run ceedling and still be able to download coverage reports as artifacts.

Old logic is more desirable, we want reports and summaries when the task is invoked, regardless of whether it was through the command line:

Image

nicofer00 avatar Apr 03 '25 18:04 nicofer00

Thanks for the great discussion. I've fixed this issue by triggering off a gcov link action, instead of searching the command line. It should be back to working correctly. :)

mvandervoord avatar Jul 09 '25 20:07 mvandervoord