ceedling utils:gcov not working
SampaiCody opened this issue · comments
Using the following tools:
Windows 10
Ceedling version 0.32.0-164e950
gcovr version 4.1
Ruby version 3.2.1
Python 3.10.5
Project.yml
:plugins:
:load_paths:
- vendor/ceedling/plugins
:enabled:
- module_generator
- gcov
- xml_tests_report
-
:gcov:
:utilities:
- gcovr
- HtmlDetailed
:gcovr:
:html_medium_threshold: 75
:html_high_threshold: 90
Running command "ceedling gcov:all" gives expected coverage output.
But then running "ceedling utils:gcov" results in the following output:
NoMethodError: undefined method `+' for nil:NilClass
C:/myProjectPath/vendor/ceedling/lib/ceedling/system_wrapper.rb:54:in `shell_capture3'
C:/myProjectPath/vendor/ceedling/lib/ceedling/tool_executor.rb:69:in `block in exec'
C:/myProjectPath/vendor/ceedling/lib/ceedling/tool_executor.rb:65:in `exec'
C:/myProjectPath/vendor/ceedling/plugins/gcov/lib/gcovr_reportinator.rb:314:in `get_gcovr_version'
C:/myProjectPath/vendor/ceedling/plugins/gcov/lib/gcovr_reportinator.rb:14:in `make_reports'
vendor/ceedling/lib/../plugins/gcov/gcov.rake:209:in `block (2 levels) in <top (required)>'
C:/Ruby32-x64/bin/ceedling:32:in `load'
C:/Ruby32-x64/bin/ceedling:32:in `<main>'
Tasks: TOP => utils:gcov
(See full trace by running task with --trace)
ERROR: Ceedling Failed
It looks like "gcovr.exe --version" is not working somehow, but from the command line it's working fine.
Any help is highly appreciated!
Tried downgrading Ruby to version 2.7.8, but same result.
Tried with Ruby 2.7.8 and Ceedling 0.31.1, also with same result.
Hey @SampaiCody, I am using the following combination, and gcov/gcovr works for me:
Ceedling:: 0.31.1
Unity:: 2.5.4
CMock:: 2.5.4
CException:: 1.3.3
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091)
I am running Ceedling using WSL2.
Hopefully this helps!
I had the same problem,
i observed that ceedling only calls "gcovr" directly (defaults_gcov.rb), and thus gcovr python script should be on PATH.
I added the Scripts folder of my local Python installation and it now works.
you should be able to call gcovr directly without calling it with "python -m gcovr".
It solved the problem in my case
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]
Ceedling:: 0.32.0
Unity:: 2.5.4
CMock:: 2.5.4
CException:: 1.3.3
Running on windows with Ruby installer for Windows and MinGW