-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feat: Add GTest/GMock support for ESP32 #66
Feat: Add GTest/GMock support for ESP32 #66
Conversation
Removed static from base path functions to clear warnings. If this function is in a header it is public and should not be static.
Removed unused code
@ciband Thanks for submitting this pull request, a maintainer will get back to you shortly! |
@faustbrian @air1one - please review this in the next few days. Be sure to explicitly select labels so I know what's going on. If no reviewer appears after a week, a reminder will be sent out. |
@ciband Your pull request doesn't follow our contribution guidelines. Please review and correct it. |
Let the project config handle it.
Since ESP32 is now supported by GTest, re-enable it. Disable ESP8266 until it can be supported.
@ciband The ci/circleci: build-linux-default job is failing as of 17c4de641710e88a599a43e17da1fdea8154b4f0. Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
Once google/googletest#2098 is merged, CI should completed and this PR will be good to go. |
googletest PR has been merged and PIO appears to be updated but the actual downloaded library from PIO is still including the source file that is causing the duplicate symbols which cause the failing build. Will continue to investigate. |
There was an issue with the googletest PR. This PR fixes it. Waiting on it to be merged. |
PR has been merged and PIO library is updated but the build still failed like the PIO library was not updated. Will keep monitoring. |
PIO library registry is updated and CI passes now. This PR should be good to go. |
@ciband A contributor has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution! |
macOS:
|
Not sure what is going on there. PIO build should be the same on Windows,Mac,Linux. Works on Windows and Linux (via CI). Do you have the latest PIO and platform updates installed? |
You can try nuking the .pio* directories in the test directory and rebuild. Looks like something with the ESP32 platform is not happy. |
@ciband However, ESP32 loops tests with: void setup() {
Serial.begin(115200);
while (!Serial); // for the Arduino Leonardo/Micro only
delay(100);
testing::InitGoogleMock();
delay(1000);
}
void loop() {
RUN_ALL_TESTS();
} Changing to the following made tests run once on-board: void setup() {
Serial.begin(115200);
while (!Serial); // for the Arduino Leonardo/Micro only
delay(100);
testing::InitGoogleMock();
delay(1000);
RUN_ALL_TESTS();
}
void loop() { } Can you confirm this? |
Yes it does. If we want it to do a one-shit then we can do that. I will push a change.
|
…/cpp-client into feat/add_platformio_gmock
Thank you, @ciband !! |
@ciband A contributor has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution! |
@ciband Your pull request has been merged but was not assigned a bounty tier. @air1one @faustbrian - please assign a bounty tier to this pull request in the next few days. |
@ciband Your pull request has been merged and marked as tier 3. It will earn you $25 USD. |
Proposed changes
Converts the IoT tests to use newly supported googletest and removes AUnit usage. This re-enables the unit test builds for ESP32.
Types of changes
Checklist
Further comments
This PR only supports ESP32, which is better than the current support of nothing. The next step is to support ESP8266. This is a work in progress.
googletest was not supported on our IoT platforms so I added support in googletest. Ark has the distinction of being the first project to use this new feature.
The following are all the commits required to make this happen:
Helps close #27