Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
TCP/TLS Socket tests will skip if TCP is not supported #10037
I generally avoid using macros, but I couldn't come up with a better way in this case.
The architectures which could make use of this (for example UBLOX_C030_N211) are not available in any RAAS server, but I agreed with @AriParkkila that he will make sure this executes correctly.
Pull request type
Uh.. You completely lost me with those macros..
I was hoping a way more simpler solution, like:
Add extra 3 lines per TCP test case.. should not be too much.
I did not consider this option to avoid influencing test results by creating, opening and closing an extra socket before every (or at least one) test routine.
In this case however, I would put it on top of #9959 and add it to the test case setup function, rather than copy it into the code of every test function...
@SeppoTakalo , unfortunately I could not put the SKIP macro inside the testcase's setup function, because the macro returns void and the wrapper needs to return a value.
But I did the second best thing possible - I added the function as you suggested and wrapped it with a simple macro, which got added to every test case.
To test the changes I locally broke LWIP::socket_open() function to return NSAPI_ERROR_UNSUPPORTED when TCP protocol is in use. All TCP and TLS tests printed the SKIP message and showed up as passing in the summary.
Reviewers, please review :)