Out of necessity I have over the years used symlinks to fool platformio
and other tools to believe source code was in a root project folder when it in fact was elsewhere.
I actually prefer to not do this and real relative pathing within config files, when possible.
In this particular instance, I have a folder structure:
-
test/arduino/unity
which contains all the PIO usual suspects (platformio.ini
, etc) -
test/arduino/unity/test
which contains the unity core main() entry file and a symlinkunity
to… -
test/unity
which contains the actual unity test files, shared across many different build systems
For pio
6.0+ with the new unit test structure, neither symlinking or relative pathing seem to work in this instance. What happens instead is the main() gets compiled, but the unity
symlink is ignored.
What does seem to work is using test_build_src = true
and moving test/arduino/unity/test
to test/arduino/unity/src
. That doesn’t feel like the right way forward though.
I’ve tried fiddling with the build_
parameters to motivate LDF to find test/unity
without success.
Please advise. Thank you!