Out-of-tree unit testing

I’ve stumbled upon that issue as well a few month ago. I managed to fix it by duplicating the CMake file used for unit testing into my project, cleaning up a few things and was able to discover my tests.

Something like this:

It was about a year ago, so it might not be compatible with the latest version, but you’ll get the idea.

On another project, I’m also brainstorming on how to best include unit tests. I think I’ll go my own path with Catch2 or unity and not try to use mbed-os internal testing tools.