Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GcovCoverageResults are generated empty when build_root is outside of the project folder #893

Open
slavko-m opened this issue May 18, 2024 · 1 comment

Comments

@slavko-m
Copy link

Hi,

When I change build_root to a folder above the folder where project.yml is, GcovCoverageResults are generated, but empty.

:project:
  :use_exceptions: FALSE
  :use_test_preprocessor: TRUE
  :use_auxiliary_dependencies: TRUE
  :build_root: "../build"

I get no errors on console, and generating coverage report works fine:

---------------------------
GCOV: CODE COVERAGE SUMMARY
---------------------------
some_lib.c Lines executed:80.00% of 15
some_lib.c Branches executed:75.00% of 8
some_lib.c Taken at least once:62.50% of 8
some_lib.c Calls executed:100.00% of 1
some_lib.c Lines executed:80.00% of 15

but html files are empty. If build_root is "build" or "some_folder/build" it works correctly. Any ideas what's wrong?

    Ceedling:: 0.31.1
       CMock:: 2.5.4
       Unity:: 2.5.4
  CException:: 1.3.3
@slavko-m
Copy link
Author

I added

args += "--object-directory \"#{File.expand_path(GCOV_BUILD_PATH)}\" "

alongside other options in the args_builder_common function from gcovr_reportinator.rb, and now it works correctly. I'm not sure if there is another solution that doesn't involve changing the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant