Ceedling Gcov 0% coverage report
I am using Mac OS 12.0.1 ,
`-------------------------- GCOV: OVERALL TEST SUMMARY
TESTED: 14 PASSED: 14 FAILED: 0 IGNORED: 0
GCOV: CODE COVERAGE SUMMARY
test_file.c Lines executed:0.00% of 236 test_file.c Branches executed:0.00% of 398 test_file.c Taken at least once:0.00% of 398 test_file.c No calls `
My first guess would be that you mocked too much :)
Haha, I have tested the code in linux vm, and it does work but it just doesn’t show coverage in mac.
So there is a difference in how you run the gcov? It has verbosity option to get more details
Yes, I have recently switched to Mac OS, and not able to run gcov on this.
If you can't spot the difference maybe you can paste some logs with verbosity[4] before gcov command.
I am having the same issue here.
I tried this in Windows and on my Jenkins server on Ubuntu 20.04, Using verbosity[4] I see nothing out of the ordinary.
gcovr_log.txt
@MichaelBMiner I do not think you are. Be careful because you need to define gcov_compiler and gcov_linker and stuff to get --coverage information. What author is saying is that coverage is working on Linux VM, but not on mac. So while this could be gcc difference (maybe mac is using clang to compile) a full verbose log along with project.yml would be really helpful in finding something different.
@Letme I attached a log above. Here is the yml file. The file name is different but I create a symlink between this an project.yml, then remove my project.yml link. pneumatic_project.txt
See your log it has:
---------------------------
GCOV: CODE COVERAGE SUMMARY
---------------------------
> Shell executed command:
'gcov.exe -n -p -b -o "build/gcov/out" "keazxx_temp.c"'
> Produced output:
File '../libraries/keazxxlib/source/keazxx_temp.c'
Lines executed:89.66% of 29
Branches executed:100.00% of 6
Taken at least once:50.00% of 6
Calls executed:71.43% of 7
keazxx_temp.c Lines executed:89.66% of 29
keazxx_temp.c Branches executed:100.00% of 6
keazxx_temp.c Taken at least once:50.00% of 6
keazxx_temp.c Calls executed:71.43% of 7
How is this the same as the issue where Ceedling Gcov reports 0% in coverage report?
The attached log file does not seem complete and from gut feeling it is also missing any coverage generation information for the GCC (-fprofile-arcs -ftest-coverage). Also attached project.yml file seems incomplete and it is missing sections for gcov_compiler and gcov_linker. Also the ceedling command you ran is missing from the log, so I do not know if you called it with gcov:all or if you also called utils:gcov (could be some old interface, but it will help active maintainers with debugging). However your issue is not the current issue described initially in this ticket and that initial ticket seems unexplored and valid.
I run with ceedling verbosity[4] clobber gcov:all utils:gcov > ceedling.txt
The project.yml is taken from a different project which correctly build reports. I have not set the gcov_compiler and gcov_linker in that project either.
ceedling.txt
A full log is provided.
But this log also correctly describes the reports in the log file - so I am not sure what you are missing or trying to tell us is wrong. The test fails, so I assume it maybe stopped executing the commands (utils:gcov is not run?)
No tests fail. In fact everything works. But when I open the files GcovCoverageCobertura.xml, GcovCoverageResults.css, and GcovCoverageResults.html nothing is displayed. The data is not filled in. GcovCoverageCobertura.xml.txt GcovCoverageResults.css.txt GcovCoverageResults.html.txt
solution provided under https://github.com/ThrowTheSwitch/Ceedling/issues/447 ticket.
@vatsalnaikgit could be closed ?