-
Notifications
You must be signed in to change notification settings - Fork 12
Platformio unit test runs the same test case twice #32
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
Comments
Hi @lightway29, there might be a conflict between the Unity distribution bundled with the mbed package and the one used by PlatformIO. Could you please try to add a special file
Then clean and test again. |
> Hi @lightway29, there might be a conflict between the Unity distribution bundled with the mbed package and the one used by PlatformIO. Could you please try to add a special file
Hi @valeros, Cleaned and checked including the `mbedignore' file to the root. Still get the same result. ![]() ![]() Have attached the sample project if it helps |
That's strange, what version of the |
![]() @valeros @ivankravets
FYI - I tried with Arduino and that works perfectly |
Please delete all previous platform instances, clean the project, run your tests in verbose mode via |
Attached piotest log file below. |
Strange, according to the log file the Unity sources from the framework are still compiled even though they should be excluded from the build. What's more, I also compiled your project example and it seems to work as expected on Linux and Windows. What happens if you manually remove the |
@valeros |
Not sure how the USB communication is implemented on this board, maybe it's a virtual COM port, so you can try adding a delay before UNITY_BEGIN just to make sure the MCU have enough time to reinitialize USB. |
I have a similar issue: when running several testcases, it works perfectly in native environment, but on the target (Arduino Mega 2560), it sometimes runs all, sometimes only the last one, and sometimes the latter twice (-> see this issue here). |
Trying to run a sample test case for mbed framework. Got everything working but running into an issue where the same test case runs twice and one fails and one passes.
https://community.platformio.org/t/platformio-unit-test-runs-the-same-test-case-twice/36404/3
platformio.ini
test_sample.cpp
Folder structure
The text was updated successfully, but these errors were encountered: