You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in implementing Unity to test my code, I'm working on a embedded C firmware for a microcontroller. To do this I tried modifying the makefile of my project to include the test folder, but found that this was not the best way. I then tried to create my own makefile, so I copied it from the Example2 folder, but got some errors. So for this reason i decided to start over and download your repo and try to run the makefile of example 2, but again i got the following errors:
I don't understand how to solve this after some attempts and I'm not sure I'm following the right way to test my code with unity. I'm aware that there is a script that generates a test runner but i'm not familiar with ruby and I can't implement something i dont understand
Seems like you are missing some tools (uname returns an error based on your screenshot) in your windowz powershell. Is there any reason why you want to stick with Makefile if you have trouble with it? Ceedling is probably the more user-friendly solution to generating a test runner and mocking than using Unity from scratch.
I had issues with ThrowTheSwitch's Makefile example as well, though the example I looked at was from the ThrowTheSwitch.org page. Here's my working example for a personal project, although it's got more than just the test build in it. If you have questions on it, let me know. I've run this in Windows Powershell, git bash, and another bash terminal just fine, since I work from multiple laptops sometimes with different systems. Also, this file is a work-in-progress as I go about my project, but the test portion won't change soon until I try out mocking.
Although I might try Ceedling at some point, I'm sticking with the Makefile I have for now because at the end of the day, it really should be no different than adding another source file to a build. I haven't gotten into mocking just yet.
Activity
Letme commentedon Apr 17, 2025
Seems like you are missing some tools (
unamereturns an error based on your screenshot) in your windowz powershell. Is there any reason why you want to stick with Makefile if you have trouble with it? Ceedling is probably the more user-friendly solution to generating a test runner and mocking than using Unity from scratch.memphis242 commentedon Apr 17, 2025
I had issues with ThrowTheSwitch's
Makefileexample as well, though the example I looked at was from theThrowTheSwitch.orgpage. Here's my working example for a personal project, although it's got more than just the test build in it. If you have questions on it, let me know. I've run this in Windows Powershell, git bash, and another bash terminal just fine, since I work from multiple laptops sometimes with different systems. Also, this file is a work-in-progress as I go about my project, but the test portion won't change soon until I try out mocking.Although I might try Ceedling at some point, I'm sticking with the Makefile I have for now because at the end of the day, it really should be no different than adding another source file to a build. I haven't gotten into mocking just yet.