Pio test with "-c" option?

I get the impression that the -c configfile.ini option is ignored in PIO 4.3.4:

$ pio test -c configs/native.ini
Error: Unknown environment names 'native'. Valid names are 'bluepill_f103c8'

There is a different platformio.ini file in the top level, but pio run -c ... will ignore it, as expected.

Yep - you’re right - neither relative nor absolute paths are recognized. pio test seems to use always platformio.ini from the top-level directory of your project, too :frowning:

I’ve made the following experiment:

  1. copied platformio.ini to subdirectory config as p.ini
  2. altered environment names inside the copy from esp32dev resp. d1_mini to esp32dev2 resp. d1_mini2
  3. started pio test -c config/p.ini

and that happened

pio test -c config/p.ini 
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items

Processing * in esp32dev2 environment
Error: Unknown environment names 'esp32dev2'. Valid names are 'esp32dev, d1_mini'

Looks like a mixture of both ini-files :open_mouth:

Are you testing with the latest dev version (pio upgrade --dev) and it’s still not working correctly? Then bug report to the developers please: GitHub - platformio/platformio-core: A professional collaborative platform for embedded development

Thx both - I’ll be more than happy to test with latest and submit an issue, if there’s an easy way to back out of a dev install later.