-
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
Generating separate binaries for each unit test for EFR32 #35028
Merged
mergify
merged 20 commits into
project-chip:master
from
feasel0:feature/splitting11--fixing-ci--aug15
Sep 4, 2024
Merged
Generating separate binaries for each unit test for EFR32 #35028
mergify
merged 20 commits into
project-chip:master
from
feasel0:feature/splitting11--fixing-ci--aug15
Sep 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review changes with SemanticDiff. Analyzed 6 of 17 files. Overall, the semantic diff is 7% smaller than the GitHub diff.
|
PR #35028: Size comparison from e8e9fc5 to 9786dd9 Full report (74 builds for bl602, bl702, bl702l, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #35028: Size comparison from e8e9fc5 to b8c957e Full report (74 builds for bl602, bl702, bl702l, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #35028: Size comparison from e8e9fc5 to 25d11ca Full report (72 builds for bl602, bl702, bl702l, cyw30739, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #35028: Size comparison from e8e9fc5 to 2eea9ce Full report (74 builds for bl602, bl702, bl702l, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…nd chip_link_test
…al logic from chip_test_suite
andy31415
reviewed
Aug 30, 2024
andy31415
reviewed
Aug 30, 2024
andy31415
approved these changes
Aug 30, 2024
…SError to make_wrapper.
jmartinez-silabs
approved these changes
Sep 4, 2024
shgutte
pushed a commit
to shgutte/connectedhomeip
that referenced
this pull request
Sep 10, 2024
…ip#35028) * silabs full changes, flashable just if * silabs full changes, flashable just if (corrected) * silabs changes, flashable changes * yes executables.gni, cts.gni, args.gni, test_driver build.gn * yes executables.gni, args.gni, test_driver build.gn * Modified chip_test_suite to handle logic for both efr32 test_driver and chip_link_test * Doc update * Added final newline * Comment updates * Remove deprecated `tests` variable for per-test custom mains. * switched to shutil.copy instead of subprocess copy * Added chip_link_tests to test_driver/efr32/args.gni and removed special logic from chip_test_suite * Restyled by gn * Restyled by autopep8 * Punctuation change * Added special exception for darwin to always include test_sources in common lib. * Added comment re darwin exception * Restyled by gn * Revisions to builder scripts - removing map() usage and propagating OSError to make_wrapper. * Restyled by autopep8 --------- Co-authored-by: Restyled.io <commits@restyled.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changing-submodules-on-purpose
Marker that this PR is changing submodules (and it is not a "commit all" typo/mistake)
github
gn
review - approved
scripts
test driver
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pursuant to Issue 33360, this PR splits up the tests for EFR32 into separate flashable binaries for each test source file.
$root_output_dir/tests
with a filename like "matter-silabs-device_tests_TestSomething.s37".chip_test.gni
since it is no longer used after the transition to pw unit test.chip_test_suite
accept the variabletests
, which adds both a test source and a corresponding custom test driver.Building
silabs_executable
for each test source:silabs_executable
target insrc/test_driver/efr32/BUILD.gn
, we setpw_unit_test_EXECUTABLE_TARGET_TYPE
to "silabs_executable" and we letpw_test
generate the executable target.src/test_driver/efr32/BUILD.gn
defines a source_set for the test driver, which is dep'd by eachpw_test
.silabs_executable
s. Since these do not defineoutput_name
, we set a default value foroutput_name
.silabs_executable.gni
andflashable_executable.gni
are modified to output toinvoker.output_dir
instead ofroot_out_dir
so that it's possible to specify a directory besides the root. Ifoutput_dir
is not defined it will default toroot_out_dir
.silabs_executable
needed modification to fix some conflicts that occurred if multiplesilabs_executable
s are built to the same directory:silabs_firmware_utils.py
andfirmware_utils.py
can't be copied via GN'scopy()
any more since multiple tests will need to copy these files into the same output directory ("tests"), and GN won't allow that. So the copying is now done insilabs_firmware_utils.py
whenmake_wrapper
is called during the creation of{target}.flash.py
.{target}.flashbundle.txt
file can no longer be generated viawrite_runtime_deps
since thecopy()
target is gone (and would have the wrong output name even if it wasn't). So the creation of{target}.flashbundle.txt
is now done insilabs_firmware_utils.py
whenmake_wrapper
is called during the creation of{target}.flash.py
.Changes to efr32 builder py:
build_examples.py
. This generates a flashbundle that includes all of the s37 and flash.py files (one for each unit test) and the two firmware utils scripts that support it.--enable-flashbundle
argument is given. Previously it had been copying those files to the artifacts directory even if that argument wasn't given (the argument was not being read).test_sources
are no longer included assources
in the suite-wide common lib (except whenchip_link_tests
= false):chip_link_tests
is true we create apw_test
target for each test source, which includes only that one test source and then deps the suite-wide common lib (which contains the commonsources
). Previously the common lib had also contained all of thetest_sources
(in addition to the commonsources
), but that's unnecessary.test_sources
be included assources
in the common lib. So we add a condition that forces the inclusion when it's Darwin.