2024-06-17 12:03 PM
I am looking to use Ceedling for a unit test framework and want to use STM32CubeIDE's Unit Test support for running it in the IDE. I have successfully set up Ceedling and am able to run from command line, but it would be nice to at least understand how to run in the IDE.
I have read over a couple different tutorials for setting up unit testing in the IDE, but haven't found guidance on addressing the issue(s) I have; perhaps I am not approaching the problem correctly. I use Ceedling to set up the initial unit test folders and project.yml file in my project folder structure. From searching around the internet, it would seem that I need to set up a Run Configuration specifically for running tests. I got the Eclipse C/C++ Unit Testing Support plugin, created a Unit Test Run Configuration for my project and added details for Ceedling. I am using Google Test runner for the output, and have the project.yml file set up to output gtest like reports. I have set up the arguments for clobber and test:all.
When I attempt to run, Ceedling always fails to launch. I attempted to put the C/C++ Application as the bin location in Ruby (where my Windows environmental variable is set to), but get a failure (likely no project.yml file in that location?). When I attempt to set the location of Ceedling in the C/C++ Application as the folder location for running it in the project (as if I were running it from the cmd line), it doesn't recognize the path, likely because there is no ceedling file there (cmd line is using env. variable, but the IDE likely doesn't use Windows env vars for its command line executions). I thought about using Eclipse environment variables, but I think those are just text replacements and doesn't address the issue of ceedling executable and project.yml file not being in the same location.
Any pointers on where to start or is there a tutorial or resource I haven't found yet that can help me understand the issue? Thanks!