PlatformIO Community

Can I set different build flags for normal build vs (unit) test build

I’m testing a networking library. During these tests I want to disable OTA firmware upgrades, but for a normal build they should be on.

I was thinking about adding a build flag ‘allowFirmwareUpgrades’ to control this, but then this flag should have different value for normal build vs test build…

I could fix this with having separate environments, but that’s kind of a dirty workaround.