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
I’ve made the following experiment:
copied platformio.ini to subdirectory config as p.ini
altered environment names inside the copy from esp32dev resp. d1_mini to esp32dev2 resp. d1_mini2
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
-------------------------------------------------------------------------------------------------------------------------------
Building...
Error: Unknown environment names 'esp32dev2'. Valid names are 'esp32dev, d1_mini'