platformio-core
platformio-core copied to clipboard
cli: `pio run --list-targets` should show `envdump`, `exec`, `test` [and others?]
Configuration
Operating system: MacOS 12.6.1
PlatformIO Version (platformio --version
): 6.1.5
Description of problem
When I type pio run --list-targets
I don't see the test
target. I guess it should be listed, as it actually exists [?].
Actual Results
✗ pio run --list-targets
Environment Group Name Title Description
------------- -------- ----------- --------------------------- ----------------------
nodemcuv2 Platform buildfs Build Filesystem Image
nodemcuv2 Platform erase Erase Flash
nodemcuv2 Platform size Program Size Calculate program size
nodemcuv2 Platform upload Upload
nodemcuv2 Platform uploadfs Upload Filesystem Image
nodemcuv2 Platform uploadfsota Upload Filesystem Image OTA
Expected Results
Same as above, but also test
target listed.
Additional info
I don't know how I know about the test
target. Maybe I just experimented, maybe I read about it somewhere in the docs. Anyway, pio run --target test
does work, so it is a target, so my intuition is that it should be listed.
# dump current build environment pio run --target envdump
~ https://docs.platformio.org/en/latest/projectconf/section_env_build.html#targets
OK, so it is not only test
, but also envdump
and maybe some other values that I don't know about yet. I wish I could get to know them by running --list-targets
;-)
And another one…
To execute a native program, you need to use exec target for the pio run --target command.
~ https://docs.platformio.org/en/latest/platforms/native.html#running-of-program
The exec
target is not listed:
✗ pio run -e native --list-targets
Environment Group Name Title Description
------------- ------- ------ ------- -------------
But it works:
✗ pio run -e native --target exec
Processing native (platform: native)
--------------------------
Verbose mode can be enabled via `-v, --verbose` option
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain+, Compatibility ~ soft
Found 3 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoFake @ 0.3.1
Building in release mode
Executing .pio/build/native/program
================= [SUCCESS] Took 1.57 seconds =======
Environment Status Duration
------------- -------- ------------
native SUCCESS 00:00:01.567
====== 1 succeeded in 00:00:01.567 ========