-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Adds lib/support/tests to the ESP32 unit-test target. Makes platform-specific fixes to ParseArgs and EncodeTlvElement. #36847
base: master
Are you sure you want to change the base?
Adds lib/support/tests to the ESP32 unit-test target. Makes platform-specific fixes to ParseArgs and EncodeTlvElement. #36847
Conversation
…dress test failures.
Changed Files
|
PR #36847: Size comparison from cfdaf79 to c320ab5 Full report (42 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink, tizen)
|
PR #36847: Size comparison from cfdaf79 to 37bd427 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #36847: Size comparison from cfdaf79 to da758f2 Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #36847: Size comparison from cfdaf79 to ebaafcf Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@feasel0 , can you please post a list of the test logs before and after your changes. If they are many in number, can you please post one log for each type: for e.g.: 1.ParseArgs tests and 2. EnocdeTLV tests in PR description. |
|
||
set -ex | ||
|
||
rm -rf out/esp32-qemu-tests src/test_driver/esp32/managed_components src/test_driver/esp32/sdkconfig src/test_driver/esp32/dependencies.lock |
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.
Can we get rid of this file by directly calling the cleanup command in the example directory either using the above command or idf.py fullclean
?
Changes
src/lib/support/tests
into theesp32-qemu-tests
target.ArgParser::ParseArgs()
to work with platforms with a non-POSIXgetopt_long
(like ESP32). This was causing failures in some of the test cases inTestCHIPArgParser.cpp
.EncodeTlvElement()
to work with platforms wheremalloc(0)
returns null (like ESP32). This was causing a failure when building zero-length strings, since the null response was being interpreted as "out of memory"..vscode/tasks.json
to include Build and Run tasks for the ESP32 unit tests.clean.sh
script for removing the files generated by the ESP32 unit test build.Notes
How is ESP32's
getopt_long
different from the POSIX version?As a result, ParseArgs needs to do a little more work when interpreting the results of
getopt_long
. This code is only executed ifCONFIG_NON_POSIX_GETOPT_LONG
is defined, which happens automatically insrc/lib/support/BUILD.gn
whenchip_device_platform
is "esp32".Testing
Automated testing. CI covers these.