-
Notifications
You must be signed in to change notification settings - Fork 3k
Greentea tests: user-configurable timeouts #9718
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
Greentea tests: user-configurable timeouts #9718
Conversation
macros , not rather test config? |
@0xc0170 , could you elaborate on this idea or point me to some existing test config? |
@0xc0170 , do you mean adding something into the "config" section of the mbed_app.json? Like so:
? This would make sense, indeed. I didn't think about it... |
I recall some tools had some problems with I am not fan of having macros used this way (setting default values and expect a user to overwrite them), rather use config. |
Well... test cases cannot expose We do configure test cases, but that is done through I'm OK with both approaches, macros or known mbed_app.json values. I want default that work 90 % of the time, and is not required to specify anywhere. And the rest is 10 % which is Cellular testing and requires specific environment anyway. |
I assume the configs should be used for something that changes frequently (like communication baudrate, shield board type, etc.). Macros seem to be more of a possibility to make a temporary hack (like heap size increase). I think macros are a better choice in our case. As Seppo suggested: most of the time we want to keep the same value of the timeout. In few special runs, at the moment only for cellular modules, we want to allow some larger timeouts and we want to avoid hacking the source code to do that. @0xc0170 , would you agree with the above? |
@michalpasztamobica, thank you for your changes. |
dfe9b5e
to
828d397
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume tests-network-interface doesn't require anything similar
I guess it might due to joining to cellular network may take minutes... |
Ok, I will add them in a minute. |
828d397
to
758914d
Compare
Please fix astyle error (1 line) |
Now it is enough to add: "macros": [ "MBED_GREENTEA_TEST_XXXSOCKET_TIMEOUT_S=20" ], to mbed_app.json, where XXX is on of {DNS, TLS, UDP, TCP}. Also network-* tests are now configurable: network-interface, network-wifi, network-emac with a similar macro.
758914d
to
ca57bdd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
CI started |
Test run: FAILEDSummary: 1 of 10 test jobs failed Failed test jobs:
|
CI was restart, all green |
Interesting. Unsure why this didn't want to be applied to the |
Description
Now it is enough to add:
"macros": [
"MBED_GREENTEA_TEST_XXXSOCKET_TIMEOUT_S=20"
],
to mbed_app.json, where XXX is on of {DNS, TLS, UDP, TCP}.
Pull request type
Reviewers
@SeppoTakalo
@AriParkkila
@pekkapesu