Skip to content

Commit 71194c8

Browse files
Add platform enable test build argument
1 parent 4887047 commit 71194c8

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.github/workflows/unit_integration_test.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Checkout submodules & Bootstrap
5353
uses: ./.github/actions/checkout-submodules-and-bootstrap
5454
with:
55-
platform: linux
55+
platform: linux unit_tests
5656
bootstrap-log-name: bootstrap-logs-unittest-${{ matrix.type }}
5757
- name: Artifact suffix
5858
id: outsuffix
@@ -66,11 +66,11 @@ jobs:
6666
# TODO: If rotating_device_id is ever removed/combined, we have to cover boringssl otherwise
6767
run: |
6868
case $BUILD_TYPE in
69-
"main") GN_ARGS='';;
70-
"clang") GN_ARGS='is_clang=true';;
71-
"mbedtls") GN_ARGS='chip_crypto="mbedtls"';;
72-
"rotating_device_id") GN_ARGS='chip_crypto="boringssl" chip_enable_rotating_device_id=true';;
73-
"icd") GN_ARGS='chip_enable_icd_server=true chip_enable_icd_lit=true';;
69+
"main") GN_ARGS='chip_build_all_platform_tests=true';;
70+
"clang") GN_ARGS='is_clang=true chip_build_all_platform_tests=true';;
71+
"mbedtls") GN_ARGS='chip_crypto="mbedtls" chip_build_all_platform_tests=true';;
72+
"rotating_device_id") GN_ARGS='chip_crypto="boringssl" chip_enable_rotating_device_id=true chip_build_all_platform_tests=true';;
73+
"icd") GN_ARGS='chip_enable_icd_server=true chip_enable_icd_lit=true chip_build_all_platform_tests=true';;
7474
*) ;;
7575
esac
7676

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
path = third_party/silabs/matter_support
210210
url = https://github.com/SiliconLabsSoftware/matter_support.git
211211
branch = main
212-
platforms = silabs,silabs_docker
212+
platforms = silabs,silabs_docker,unit_tests
213213
[submodule "third_party/silabs/simplicity_sdk"]
214214
path = third_party/silabs/simplicity_sdk
215215
url = https://github.com/SiliconLabs/simplicity_sdk.git

build/chip/tests.gni

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ declare_args() {
2727
# Enable building tests.
2828
chip_build_tests = current_os != "freertos"
2929

30+
# Enable building all platform specific tests.
31+
# This argument should set the default value for platform specific tests build arguments.
32+
# See src/platform/silabs/tests/args.gni as an example.
33+
chip_build_all_platform_tests = false
34+
3035
# Enabling useful support functions when building using GoogleTest framework (used in unit tests and pw_fuzzer FuzzTests)
3136
# For unit tests: this should only be enabled through build_examples.py, see PR #36268
3237
chip_build_tests_googletest = false

scripts/checkout_submodules.py

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
'genio',
5252
'openiotsdk',
5353
'silabs_docker',
54+
'unit_tests'
5455
])
5556

5657
Module = namedtuple('Module', 'name path platforms recursive')

src/platform/silabs/tests/args.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ import("//build/chip/tests.gni")
1616

1717
declare_args() {
1818
# Build argument to enable Silabs specific unit tests
19-
sl_build_unit_tests = chip_build_tests
19+
sl_build_unit_tests = chip_build_all_platform_tests
2020
}

0 commit comments

Comments
 (0)