Using RTEMS chains API in non-RTEMS unit testing?

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jan 4 06:54:32 UTC 2019


On 03/01/2019 16:39, Martin Erik Werner wrote:
> Hello,
>
> 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
> stimuli/checked-output).
>
> 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?
>

It should be quite easy to satisfy the dependencies of the chain API. It 
is just RTEMS_INLINE_ROUTINE and a couple of data types.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list