Unit test large projects with Ceedling

515 views Asked by At

I've used Ceedling in the past on bare-metal projects that don't have many vendor libraries, so creating unit tests and mocking dependencies was pretty easy.

Now I'm trying to integrate Ceedling on a very large project. On this project I'm implementing an application on top of an existing OS and set of libraries provided by some manufacturer. I have the source code for most of it, but not all of it, so my control over those libraries is limited, especially when it reaches low level modules like the scheduler and communications with the other CPU.

So... I decided to give it a go by implementing a very simple unit test that only has one dependency, which I tried to mock. It turned out to be a nightmare right off the bat. That file ended up including a bunch of unrelated modules, so my idea was to mock all those modules until Ceedling stopped complaining. However, I hit a wall when I saw that some of them are automatically generated at compile time in a very obscure way by the ADK.

My question is then, how does one unit test this kind of projects? I feel that I'm missing something very fundamental when dealing with this type of projects, but I can't figure out what.

0

There are 0 answers