-
Notifications
You must be signed in to change notification settings - Fork 1
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
Async control & api update #3
Conversation
Awesome! |
@omonrise has debugged most issues, but we might have an issue with the testing suite itself: https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/index.html It seems that not every platform is supported by each testing suite |
And there something for local development called Arduino Mock?!? https://github.com/platformio/platformio-examples/tree/develop/unit-testing/arduino-mock |
tried to switch to unity testing framework aaand In file included from .pio\libdeps\uno_r4_wifi\Unity\src\unity.h:21:0,
#include "unity_config.h"
|
…, unity_config.h can be removed and Test items are correctly referenced.
…projecttea into feature/async_control
@GreenWizard2015 , so we put in some effort to make this work. Its not 100% functional yet. Could you review all the links that we have shared. Our learning from our session were:
Would this be enough for you to look into it again and see whether you can solve it? |
@omonrise yeah, hi) Well, everything didn't go quite as I wanted, so I redid everything) Now the project assembles properly, the tests work, and even their status is visible in VSCode. I really don't like the idea of testing with a fake Android. To be more precise, I don't want to test absolutely everything this way. I believe it's better to abstract as much as possible from the hardware/platform. And only in extreme cases, test with hardware emulation. |
So I am fine with skipping the emulator stuff, :) I still have a few notes:
|
Yes, everything is as you described. I'm not sure if there would be issues due to FakeArduino, but my experience suggests that it's better to avoid such things. This way, the tests are more reliable, and the code is more thoughtful because there are strict limitations and you can't just lump everything together in a way that somehow works. |
I was cheeky and split out the CI, to have a clearer feedback of the CI-checks. |
Ow, and what would a test protocol look like with all the code changes for real life testing? Specifically a question for @GreenWizard2015 |
…ea into feature/async_control
In general, its ready and I'm waiting for the feedback :-) |
As discussed, test protocol:
I will be testing it in real life today or tomorrow |
I can confirm that everything works:
Note that we are almost out of memory, so lets stop adding features ;)
|
just in case, don't merge till we done full testing of this and UI branch. |
All testing done
|
Lets merge :) |
I don't think there's any point in describing the code :)
The main issue is with compiling the unit tests. I've set up a native environment and separated the platform-dependent code, but for some reason, all files are being compiled during the build, which is causing problems.