Not sure if this is a bug or a feature request. The command-line runner is not doing as I would expect :)
Configuration
Operating system: Ubuntu 20.04
PlatformIO Version (platformio --version): PlatformIO Core, version 5.1.0
Description of problem
I would expect that command-line switches override values in the platformio.ini file, because that's the way most (all?) other packages work. E,g. with ansible, I specify config vars in an ini file that override the defaults. If I then specify a command-line argument, the argument overrides both the value in the ini file and the application's defaults. That doesn't appear to be the case with the "pio test --filter" switch at least.
Steps to Reproduce
- Add a
test_filter = abc, def, xyz value into a [env:native] section in platformio.ini
- run pio test -e native -f xyz
Actual Results
The command-line flag is ignored/ overridden by the ini file entry - all test suites specified in the ini file are run
Expected Results
I would expect to only run the xyz test suite in the native environment.
Additional info
This is a problem because a test_filter in an env section is common, as some tests require the microprocessor so will not run natively. Being able to filter to specific tests when running them natively is very useful when adding new features.
Not sure if this is a bug or a feature request. The command-line runner is not doing as I would expect :)
Configuration
Operating system: Ubuntu 20.04
PlatformIO Version (
platformio --version): PlatformIO Core, version 5.1.0Description of problem
I would expect that command-line switches override values in the platformio.ini file, because that's the way most (all?) other packages work. E,g. with ansible, I specify config vars in an ini file that override the defaults. If I then specify a command-line argument, the argument overrides both the value in the ini file and the application's defaults. That doesn't appear to be the case with the "pio test --filter" switch at least.
Steps to Reproduce
test_filter = abc, def, xyzvalue into a[env:native]section in platformio.iniActual Results
The command-line flag is ignored/ overridden by the ini file entry - all test suites specified in the ini file are run
Expected Results
I would expect to only run the
xyztest suite in thenativeenvironment.Additional info
This is a problem because a
test_filterin anenvsection is common, as some tests require the microprocessor so will not run natively. Being able to filter to specific tests when running them natively is very useful when adding new features.