Now I want to add unit testing so I added the native environment:
[env:native]
platform = native
When I try to run the unittest I get the “Unknown Board ID” error, because [env:native] also inherits the common settings from [env]. If I copy the [env] settings in [env:release] and [env:debug] and remove the [env] section it works. But then I loose the advantage of a common section for release and debug settings. What is the best way to handle this? Any good practices?
You can put options that are shared but not shared with all environments also in a seperate environment (not called env) and reference them with the name of the environment and attribute.
The settings are still only defined once but the inclusion has to be repeated in every environment.
A shorter way would be with the extends directive. A common embedded environment is created which is simply inherited and extended by other more concrete embedded environments.