10 years ago.

Yotta, GreenTea, existing mbed library

Hello,

Can existing mbed libraries be set up to use the GreenTea testing framework, or do you have to create a new module using the yotta command line tools?

I reviewed the short tutorial at the following link on how to create a yotta module, or clone one from a git repo, but it appears that our existing mbed code uses mercurial. I guess my question boils down to, "how do I use hg clone" to clone my repo to the directory I am experimenting with yotta in?

Thanks

I think I found the answer to my question at the following link

https://www.mbed.com/en/development/software/tools/testing/

Note 3 under 'Notes', "The test framework works only with software packaged with yotta. yotta must have the tests in the location Greentea expects them to be. For instructions, see here."

So from this note I believe you must use Yotta to create a module for your existing libraries. For me, I don't think this is a big deal since most of my stuff is composed of a few source files and I can easily export them and include them in the source directory of the yotta module, but what about larger libraries? Or, am I on the wrong path?

Thanks,

posted by Justin Jordan 30 Sep 2015

1 Answer

10 years ago.

For mbed OS related questions, use mbed.com forum please.

You need to yottalize (I believe that's the verb for it), to make your module compatible with yotta, for example test directory where are tests, source where are sources, includes can be expanded using extraIncludes for example.

I am confused, if you are talking about mbed libraries posted here for mbed 2, or strictly speaking only about mbed OS?

Hello Martin,

Thanks for responding.

I am thinking of both mbed 2 libraries and future development using mbed 3 and mbed OS.

My goal is to utilize the command line tools offered by yotta, and the testing framework, for TDD on all of my mbed related work.

My understanding is that I can use the tools offered, mbed-htrun and mbed-ls, to automate testing for multiple platforms connected to a single machine. Is this correct?

Eventually I would like to get everything setup with cppUtest since I have been reading through James Grenning's book on TDD for embedded C.

Thanks,

posted by Justin Jordan 01 Oct 2015