0

I'm working on unit tests for a c embedded project with Bazel, first I tested the code with Ceedling (Unity and cmock) and It worked. And now, I'm trying to merge to Bazel but I did not find any document about using ceedling with Bazel.

Nesmo07
  • 15
  • 3

1 Answers1

0

I have made a quick research and it looks like there is no ceedling support for Bazel. You could write some custom rules for stuff you have mentioned, but I guess, that rewriting to Bazel rules will be much easier and maintainable

slsy
  • 1,257
  • 8
  • 21
  • Thank you for your answer, I want to know how to mock test using Bazel this is my problem write now, because Ceedling uses Unity and Cmock, for unity it's not a problem I can link my Bazel project to this library, but for for cmock it's complicated. I read some things about gmock in googleTest, but I'm not sure. – Nesmo07 Jun 25 '21 at 08:08
  • I see problem here: gmock does not requires any code generation: it is a pure C++ library. Cmock (probably) generate code using some external scripts, you can try to use a https://docs.bazel.build/versions/main/be/general.html#genrule to generate files using cmock – slsy Jun 25 '21 at 08:31
  • And last question, do you know what's better to use for mocking c embedded gmock in google test or cmocka (not cmock) with Bazel? – Nesmo07 Jun 25 '21 at 09:28