-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformIO test building code twice run #4307
Comments
There are 2 different stages: firmware building and firmware uploading. The firmware uploading stage depends on the building stage. There is no "rebuilding", the "uploading" stage reuses all objects that were compiled at the first stage. If your project has custom requirements, you can override default configuration with a custom testing framework https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/custom/index.html |
Hi @ivankravets, I am aware of those stages, what I am pointing out is that Platformio is effectively building the test firmware twice, which can be very time consuming for large unit tests. You don't even need a board to observe this issue. I am running this test in a simple Uno project: platfromio.ini:
src/main.cpp (not really needed, but here it is):
test/tets_test/main.cpp:
As previously mentioned, my understanding is that |
Thanks, I think we can merge these stages into the one if there are no custom stages are passed. |
Thanks for the report! Please re-test with Does it work as expected now? |
No worries. It works like a charm now. |
What kind of issue is this?
Configuration
Operating system:
PlatformIO Version (
platformio --version
): PlatformIO Core, version 6.0.2Description of problem
PlatformIO test seems to be compiling twice
Steps to Reproduce
pio test -vvv
Actual Results
The two images below are the results from the same
pio test -vvv
run. I split them in two to increase the resolutionExpected Results
PlatformIO test to build once per run
Additional info
Commenting lines 139, 141 and 142 from the file below seems to do the trick. I am not sure what impact this would have on other platforms.
platformio-core/platformio/test/runners/base.py
Lines 139 to 142 in 11a43b2
The text was updated successfully, but these errors were encountered: