<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 4, 2019 at 12:54 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 03/01/2019 16:39, Martin Erik Werner wrote:<br>
> Hello,<br>
><br>
> I'm currently using Google Test in order to run some unit tests on an<br>
> RTEMS application in a non-RTEMS Linux Development environment, via a<br>
> (fairly messy but operational) fake environment and mocking/faking<br>
> calls to RTEMS manager functionality (e.g. semaphores, message queues,<br>
> which are either uninteresting in the test scope, or used for<br>
> stimuli/checked-output).<br>
><br>
> I'm interested in using the RTEMS chain API, but given the current unit<br>
> test setup, it looks like it would then need to mock/check each<br>
> individual chain call and emulate its behaviour, rather than being able<br>
> to check only a certain result in the final chain. It would be nice to<br>
> avoid needing to partially re-implement the chain API behaviour in each<br>
> test case (or re-implement it completely in a full fake).<br>
><br>
> I've briefly looked at trying to separate the chain API functionality<br>
> in order to be able to link to it from the non-RTEMS unit test<br>
> application. But it appears like it is hard to avoid getting RTEMS<br>
> specifics pulled along with it.<br>
><br>
> Does anyone have previous experience with compiling parts of RTEMS like<br>
> this? Or any tips on potential solutions?<br>
><br>
<br>
It should be quite easy to satisfy the dependencies of the chain API. It <br>
is just RTEMS_INLINE_ROUTINE and a couple of data types.<br></blockquote><div><br></div><div>I've copied the code out in the past and used it. There wasn't much to address</div><div>and still shouldn't be. As Sebastian notes, the code is portable with a few</div><div>RTEMS-isms like that.</div><div><br></div><div>--joel</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : +49 89 189 47 41-16<br>
Fax     : +49 89 189 47 41-09<br>
E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></blockquote></div></div>