Unit Testing on Legato

The Legato documention teases about being able to use unit tests by documenting an API and providing an example. What is missing is what you actually do with it. I’m interested in writing some unit tests as I develop some code for a Legato application. I’d rather not be forced to run the tests on the mangOH target I’m currently using as that slows me down. Running them on a host VM is how I’ve used CUnit before and provides a great way to test small bits of code. If they can only be run on a Legato platform, then can that be on the host?

How should I be compiling and running these tests? I’m familiar with CUnit, make, writing a Makefile, gcc and so on, but am only just learning the mkapp tool and how that is used with the IDE and adef, cdef, api files etc… Do I have to create a seperate test application and copy the code I want to test? When developing for embedded Linux I would add a test directory and put the files in there, and the Makefile would be told what to build for the unit tests.

The end goal with this is not only to verify that bts of code are correct as they are written, but that they will be autonomously tested from a Jenkins server as the product matures. So any hints as to the best way forward with that would be very useful.

The Legato framework was selected for our new product as it really looks to be providing so much of the functionality that we need. Thanks to Sierra Wireless for investing in it so far - I hope we can all drive it forwards!