Why gcov and cmock can't be enabled together #1001
Replies: 2 comments 5 replies
-
Hi. Do any of these If so, it's very likely that your problem has nothing to do with mocks and everything to do with a parsing bug we found and have fixed in the 1.0.1 prereleases. Perhaps you can try the prerelease and see if it fixes your problem? Otherwise, can you share the top of your test file so we can see the include section? I'd like to try to reproduce the problem. |
Beta Was this translation helpful? Give feedback.
-
You need to include EITHER Make sense? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to generate coverage reports while using cmock and whenever i include "mock_*" and run gcov:all i get this warning⚠️ WARNING: Found no coverage results for test_apis::apis.c and when i comment the #include "mock_apis.h" everything runs ok. After investigation i found that in case of including mock file that's the building objects
Compiling test_apis.c...
Compiling test_apis::mock_apis.c...
Compiling test_apis::test_apis_runner.c...
Compiling test_apis::unity.c...
Compiling test_apis::cmock.c...
and when i comment it the building objects are
Compiling test_apis.c...
Compiling apis.c with coverage...
Compiling test_apis::test_apis_runner.c...
Compiling test_apis::unity.c...
So I've tried to force it to compile the apis.c with coverage before compiling mocking but i couldn't.
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions