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

Most upvoted comments

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_mocks in your configuration and try again?

I deleted my build directory now, just to be sure that there is no old data. Up to now, I only used ceedling clean.

By the way, when you make changes to the project.yml, I’d recommend running ceedling clobber rather than ceedling clean to completely remove all automatically generated files

could you verify

Yes, with my flags replaced with yours, it is the same thing. Even with -Werror -Wno-comment commented out.