-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add support for GoogleTest unit testing framework #3572
Comments
Unity is very good testing framework. It was created to be used in embedded projects. It's light-wight. Also, it works well on native platforms as well. Could you provide a simple project to reproduce your issues? |
Hello Ivan, I have created a small reproducer. You find it at https://github.com/arduhe/reproducer_3572.git. Currently when you start the tests, this happens
After the test terminates, the process still "hangs" waiting for further output. I must kill it with ctrl-c. Additionally no information is shown, whether the complete test suite is successful or not. What I would expect is something like that
I have made a small patch for embedded.py which produces the desired results - as seen above ;-). As my knowledge in python is not very high, I am not sure whether it would be sufficient for a PR, but probably it could be used as a prototype for development. The patch is attached to this comment. Kind regards 0001-patch-for-gtest-support-1st-working-prototype.patch.txt |
Sorry - made accidentally the git repo with the reproducer private. I've corrected that. Kind regards P.S.: Why didn't you complain that? 😉 |
Sorry, haven’t had a time to check it :( so busy with upcoming PlatformIO Core 4.4 release. We will back to this issue soon. Thanks. |
@ivankravets Another argument for Google-Test: IDE Integration. There is no IDE-Integration (CLion) for Unity but a very good one for Google-Test. Programming without good support from your IDE is these days simply to complex and time consuming. |
See updated docs for unit testing https://docs.platformio.org/en/latest/advanced/unit-testing/index.html Please re-test with |
I am trying to use gtest instead of unity as test framework.
Motivation - I’d like to use the same framework in all environments (embedded and native) and not two different 😉 .
In a native environment pio test works good and as expected, whereas in a embedded one (e.g. espressif8266/d1_mini) pio test neither makes highlighting of test results nor finishes - I have to abort manually each run 😮 .
I’ve dug a little bit inside pio and think I’ve located the place where this behaviour could be changed. In platformio/commands/test/embedded.py the output from the tests is scanned to make highlighting and to detect the end of the tests. Currently it supports only the strings used by unity.
Could this please be altered to support gtest in embedded environments, too?
Thx
The text was updated successfully, but these errors were encountered: