question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"pio test -c someconfig.ini" ignores "-c"

See original GitHub issue
  • PlatformIO Core. If you’ve found a bug, please provide an information below.

Configuration

Operating system: macOS

PlatformIO Version: 4.3.4

Description of problem

pio test -c configs/native.ini gives an error msg.
With pio run -c configs/native.ini, it works as expected.

Actual Results

The platformio.ini file is used, which does not contain a “native” env:

Error: Unknown environment names 'native'. Valid names are 'bluepill_f103c8'

The content of platformio.ini:

[platformio]
extra_configs = configs/bluepill_f103c8.ini

Update: see also https://community.platformio.org/t/pio-test-with-c-option/14731

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jcwcommented, Aug 25, 2020

Great, thx. Yes, [env] is a very useful addition. And the above would scale nicely to [env:dev1], [env:dev2], etc to let me pick exactly the small subset of boards I am currently focusing on - even if configs/ ends up being huge.

Thanks Ivan. Fantastic job by you and your team.

1reaction
jcwcommented, Aug 25, 2020

The main platformio.ini can be something like:

[platformio]
extra_configs = configs/[a-z]*.ini
default_envs = disco_f407vg

[env]
test_filter = type

[env:disco_f407vg]
build_flags = -Wno-return-type -DNDEBUG
monitor_port = /dev/cu.usbmodem1462203
test_port = /dev/cu.usbmodem1462203

One minor issue remains: AFAIK, I can’t add to the build_flags setting in this setup. It would be nice to have the ini files have all the stuff essential for building as is, and then allow adding more flags in the above (or vice versa: have the ini files add to what is present in the platformio.ini file. But now we’re straying into wish-list territory 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependency error, what am i doing wrong?
I am quite sure there is some config in my ini file wrong but i can't ... 1.0 (C:\Users\vincenzo\.platformio\packages\framework-arduinoavr\ ...
Read more >
espressif/arduino-esp32 - Gitter
There is no way to not compile certain pieces of IDF so it is necessary to include some config even if it is...
Read more >
How do I run some config before every Jest test run
I'm writing tests for a React application which makes use of Fluxxor to provide an event dispatcher. Making that work requires telling Jest...
Read more >
CHANGELOG - device/ti/bootloader/uboot - Git at Google
out, get_prom function of ax88796.c is ignored. ... sh: rsk7203: Add smc911x driver support to board config file ... configure hardware for a...
Read more >
ftp.dei.uc.pt/pub/linux/kernel/v2.6/ChangeLog-2.6.24
Fix it by decrementing c in the beginning of the various I/O loops. ... Linux should ignore its effect by default, and should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found