-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Proposed changes to split tests into separate binaries for efr32 [Version 1] #33786
base: master
Are you sure you want to change the base?
Proposed changes to split tests into separate binaries for efr32 [Version 1] #33786
Conversation
…to use glob, and updated the test runner to use the flash_image parameter for directories
PR #33786: Size comparison from 72450e4 to 53f4263 Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
copy(flashing_runtime_target) { | ||
sources = flashing_script_inputs | ||
outputs = [ "${root_out_dir}/{{source_file_part}}" ] | ||
if (defined(invoker.copy_py_files) && invoker.copy_py_files) { #++++ added this |
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.
The "copy" action only needs to be done once per build, however now that silabs_executable
is being called many times it ends up trying to copy these same python files repeatedly which causes an error. I could not find a clean way of making it only copy once, so as a workaround I use a variable copy_py_files
that controls whether the files get copied or not. This variable is set to false after silabs_executable is invoked so the files won't be copied next time.
The approach here is to keep the
silabs_executable
targets insidesrc/test_driver/efr32/BUILD.gn
and to leavechip_test_suite
alone without any knowledge of efr32.This creates a
.s37
file for each test suite. I have tested the build process and it seems to generate the correct files, with each.s37
file only having the tests for that particular suite. However without the hardware I have not yet flashed and run them on a device, so I can only judge by the.map
file what's inside them. But in general I believe this PR is functional and does what it's supposed to do.Note that even though there's a binary for each test directory (rather than a binary for each individual test source within that directory), each of the binaries is able to build without a complaint about flash size limitations. So that means so far none of our test directories are too large to fit on the device. So we could get away with 20-something binaries instead of 200-something if we wanted to go this route.
(This is a work in progress, so please ignore any commented-out code and print statements.)
The drawback to this approach is that it requires
src/test_driver/efr32/BUILD.gn
to have a list of all test directories. This is not ideal since it will need to be updated any time a new test directory is created. To avoid this I have made another version which moves thesilabs_executable
target intochip_test_suite
. See Version 2.