Ceedling: Mock header file not found
Hello!
I have an issue while migrating to ceedling 1.0 with a previously working test configuration. As expected, I had to add a few include directories, but now I am stuck at an issue with the discovery of a mock header.
🧨 EXCEPTION: 'Default Test File Full Preprocessor' (gcc) terminated with exit code [1] and output >>
cxx/libraries/protocol/tests/protocol/test_protocol.c:35:10: fatal error: mock_mic_assert.h: No such file or directory
35 | #include "mock_mic_assert.h"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
🌱 Ceedling could not complete operations because of errors
When not using the mocked header, but using mic_assert.h as an include, it is discovered correctly.
What am I missing? Thanks!
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 63 (31 by maintainers)
Commits related to this issue
- Fix parsing issues with line continuations, macro detection, and comment handling. (#978, #981, #985) — committed to ThrowTheSwitch/Ceedling by mvandervoord 2 years ago
Version 1.0.1 solves this issue for me.
@mtnmbr I have a theory. And, it’s a silly and unfortunate bug. Mocking is supposed to be on by default, but in some cases (now fixed) it is not. Could you explicitly enable
:use_mocksin your configuration and try again?By the way, when you make changes to the
project.yml, I’d recommend runningceedling clobberrather thanceedling cleanto completely remove all automatically generated filesYes, with my flags replaced with yours, it is the same thing. Even with
-Werror -Wno-commentcommented out.