Open ZaneV opened 5 years ago
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-906
@ZaneV That's because you have made change to mbed-os, which is a different repo (and uses git) from your project.
@theotherjimmy okay so that's what I am concerned about... How do I keep my unit test code apart of my repo and not modify the mbed-os repo if all the unit testing code has to live inside the mbed-os/UNIT TEST folder?
@ZaneV I don't think that the unittest mechanism from mbed-os is designed to be used outside the repo. As these are unit tests, you can use any build system that you like, and are not constrained to use mbed-cli
@theotherjimmy okay that makes sense. I will run cmake with Googletest for my own program. The mbed-cli usage documentation on unittests doesn't seem to spell that out too clearly for us rookies and kind of implies that the unittests feature with mbed-cli would be suitable for using on your own program. But that is my opinion. Thanks for all your help.
We'll keep this issue open to clarify the usage of mbed test --unittest
(or remove it entirely as it's not a user-facing feature)
Okay thanks, could I recommend not removing the unit test section in the documentation but perhaps have a brief guideline on how unit testing might be implemented using cmake and point the reader to some helpful resources. I think the page has been good for me to get an idea of writing unit tests. Anyway thanks again for all your help, I'll leave it in your hands!
Sure, we can have the documentation outline how a user could write unit tests for their app/lib. That's independent of having a "sub-subcommand" for it.
Apologies, this was closed in error by the automated bot - re-opening.
Internal Jira reference: https://jira.arm.com/browse/IOTBTOOL-465
First time posting a github issue and I feel like this is a rookie error I am making but here goes:
I have added unit test files under the mbed-os/UNITTESTS directory and am at the stage that I want to commit all my files and push. However, (I am using Mercurial) if I use the command :
mbed status
No changes have been detected. Also,hg add
doesn't detect any changes either.If I look in the mbed-os directory I see a .gitignore file. Changing this to .hgignore and then running:
mbed status
Give the following:However it isn't detecting the actual unit test .cpp & cmake files.