Using RTEMS chains API in non-RTEMS unit testing?

Martin Erik Werner martinerikwerner.aac at
Thu Jan 3 15:39:19 UTC 2019


I'm currently using Google Test in order to run some unit tests on an
RTEMS application in a non-RTEMS Linux Development environment, via a
(fairly messy but operational) fake environment and mocking/faking
calls to RTEMS manager functionality (e.g. semaphores, message queues,
which are either uninteresting in the test scope, or used for

I'm interested in using the RTEMS chain API, but given the current unit
test setup, it looks like it would then need to mock/check each
individual chain call and emulate its behaviour, rather than being able
to check only a certain result in the final chain. It would be nice to
avoid needing to partially re-implement the chain API behaviour in each
test case (or re-implement it completely in a full fake).

I've briefly looked at trying to separate the chain API functionality
in order to be able to link to it from the non-RTEMS unit test
application. But it appears like it is hard to avoid getting RTEMS
specifics pulled along with it.

Does anyone have previous experience with compiling parts of RTEMS like
this? Or any tips on potential solutions?

Martin Erik Werner <martinerikwerner.aac at>
ÅAC Microtec AB | Clyde Space Ltd.

More information about the users mailing list