How to build and run a Unity test example for unit testing

96 views
Skip to first unread message

Sanjana Goswami

unread,
May 26, 2021, 3:03:26 AM5/26/21
to ThrowTheSwitch Forums
Hi, 

So I recently started exploring Unity. I downloaded the project from git that I found on your website. I wanted to build and run the example program that you have provided on CMD Prompt (windows OS) using Cygwin (this is how I was using Ceedling as well). Is it possible? And if yes, what is the command to run and test the project to generate a test report? 

Thanks in advance!
Sanjana

Mark Vander Voord

unread,
May 26, 2021, 6:48:52 AM5/26/21
to ThrowTheSwitch Forums
Sanjana:

I'm not sure which example you grabbed. If it's one that is intended to be run using the native compiler, then it should work with the configuration you have. Otherwise you may need an additional cross-compiler.

Assuming your toolchain is ok (most of the examples are), in the main folder there will be a make or rake file. If you're looking at a makefile, you can run the tests by running "make" or "make test". If the project has a rakefile, you can instead run "rake" or sometimes "rake test:all". If none of these options work, can you post a link to the project you're working with?

Mark

--
You received this message because you are subscribed to the Google Groups "ThrowTheSwitch Forums" group.
To unsubscribe from this group and stop receiving emails from it, send an email to throwtheswitc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/throwtheswitch/ce1c476f-081c-4827-a064-78cabc2b0419n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages