I finally started to add some unit tests for a library I’m working on and had some trouble figuring out why
pio test whould ignore my dependencies when using the Native platform. Turns out my dependency specified
framework = "arduino" causing it to be rejected. Either setting
lib_compat_mode = off in my project or changing the dependency config to
framework = "*" fixed this problem but I am not a big fan of either solution.
This leaves me with the following question: What would be a framework to add for compatibility with the Native platform? I saw examples of setting
board in conjunction with
platform = native but never
framework. Is there no such thing for the Native platform?
lib_compat_mode = off only for the native environment used for unit tests seems to be the least invasive solution I can see but would only work with dependecies not really requiring a specific framework.
At least for the Arduino framework there seems to be a solution using ArduinoFake as recommended in this discussion:
Any thoughts or recommendations are certainly welcome