Main or src folder needed for testing?


Just a question, it seems like the framework expects a main or src folder of some kind even if I am just running unity testing.

However, if I am making a framework or something else, I want to move that into for example “example/src” or whatever, and then I have to have src_dir setting. Or don’t have one at all, it doesn’t serve much purpose for TDD.

It is certainly not a big or important thing, more just slightly annoying and something I don’t understand.

Edit #1: Actually, for some reason I could not point to example/src. What do you do when I want to point it somewhere else?
Edit #2: That was because it wasn’t in the CMakeLists.txt . For future reference, it has to be.

See test_build_src — PlatformIO latest documentation

It should not build the src folder by default. Could you provide a project to reproduce your issue?