Flags doesnt seem to work with codecov tool and gcov upload


I am using the new codecov uploader tool and it works great for most of my use cases except for cpp.
We have a monorepo setup with Python, Javascript and cpp package and using Flags to upload code coverage for each package.

I am building the cpp project with gcc with the correct code coverage flags. I run unittests and code coverage files are generated. All looks good so far.

I noticed that the new codecov tool have support for gcov, I am using this command to upload the code coverage data - codecov -r ../.. -F client-catapult --gcov-glob tests/ external/ --gcov-root .

======================== gcov ========================:
  --gcov-root GCOV_ROOT
                        Project root directory when preparing gcov
  --gcov-glob [GCOV_GLOB [GCOV_GLOB ...]]
                        Paths to ignore during gcov gathering
  --gcov-exec GCOV_EXEC
                        gcov executable to run. Defaults to 'gcov'
  --no-gcov-out         Disable gcov output
  --gcov-args GCOV_ARGS
                        extra arguments to pass to gcov

My problems are

  1. It doesnt seem like the data always show in the UI even though it was loaded. Not sure how long is the delay.
  2. When it does show, the code coverage data is not shown under the correct folder. In this case the flag is client-catapult, so the code coverage should be shown under client/catapult folder. I am not sure if I am missing some flag in gcov. This works correctly for the other flags


Currently just manually running commands to generate the code coverage

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

==> Uploading
    .url https://codecov.io
    .query commit=805290d6de3347eca47790775d7cbb5b109a25ff&branch=dev&token=<secret>&slug=..%2F..&flags=client-catapult&package=py2.1.12
    Gzipping contents..
    Compressed contents to 5345945 bytes
    Pinging Codecov...
    Uploading to S3...
    Uploading to S3 took 0:00:01.721345

Expected Results

The code coverage results does not show under the correct folder.

Actual Results

Expected the code coverage results to show under client/catapult but they show under the root.

Additional Information

Here is the yaml file for the repo - Codecov

To add some more information, the output below the folders extensions, plugins, and scr/catapult should all be under the client/catapult folder(flag)

uploaded data is here - https://api.codecov.io/upload/gh/symbol/symbol/download?path=v4/raw/2022-02-25/5906131E70BB6F6A9D0E465027DAF0E8/805290d6de3347eca47790775d7cbb5b109a25ff/6809561d-8912-4bbe-8ec8-549efb82553a.txt

@Wayonb thanks for this, I think we have found a bug in the uploader and are working to get it fixed. I’ll ping back here when it should be working again

Thanks @tom for the quick response.

@Wayonb sorry for the delay here. We’ve made an update to the uploader, can you try again?

@tom Thanks for the update. I created a workaround using lcov but I will give the new uploader when I have sometime and update the thread.

@Wayonb in case you wanted to try out the new uploader, you can add the -g flag when calling ./codecov