|
15 | 15 | import("//build_overrides/build.gni")
|
16 | 16 | import("//build_overrides/chip.gni")
|
17 | 17 | import("//build_overrides/pigweed.gni")
|
| 18 | +import("${chip_root}/build/chip/chip_test_group.gni") |
18 | 19 | import("${chip_root}/build/chip/chip_test_suite.gni")
|
19 |
| -config("unit-test-config") { |
20 |
| - defines = [ "OTA_ENCRYPTION_ENABLE=1" ] |
| 20 | + |
| 21 | +declare_args() { |
| 22 | + # Build argument to enable Silabs specific unit tests |
| 23 | + sl_build_unit_tests = true |
21 | 24 | }
|
22 | 25 |
|
23 |
| -chip_test_suite("tests") { |
24 |
| - output_name = "libSilabsExamplesPlatformTests" |
| 26 | +chip_test_group("silabs_example_platform_tests") { |
| 27 | + tests = [] |
| 28 | + |
| 29 | + if (sl_build_unit_tests) { |
| 30 | + tests += [ "${chip_root}/examples/platform/silabs/tests" ] |
| 31 | + } |
| 32 | +} |
25 | 33 |
|
26 |
| - test_sources = [ "TestSilabsTestEventTrigger.cpp" ] |
| 34 | +if (sl_build_unit_tests) { |
| 35 | + chip_test_suite("silabs_example_tests") { |
| 36 | + output_name = "libSilabsExamplesPlatformTests" |
27 | 37 |
|
28 |
| - public_configs = [ ":unit-test-config" ] |
| 38 | + test_sources = [ "TestSilabsTestEventTrigger.cpp" ] |
29 | 39 |
|
30 |
| - public_deps = [ |
31 |
| - "${chip_root}/examples/platform/silabs/test-event-trigger:sources", |
32 |
| - "${chip_root}/src/lib/core", |
33 |
| - "${chip_root}/src/lib/core:string-builder-adapters", |
34 |
| - "${chip_root}/src/lib/support", |
35 |
| - "${chip_root}/src/lib/support:testing", |
36 |
| - ] |
| 40 | + public_deps = [ |
| 41 | + "${chip_root}/examples/platform/silabs/test-event-trigger:sources", |
| 42 | + "${chip_root}/src/lib/core", |
| 43 | + "${chip_root}/src/lib/core:string-builder-adapters", |
| 44 | + "${chip_root}/src/lib/support", |
| 45 | + "${chip_root}/src/lib/support:testing", |
| 46 | + ] |
37 | 47 |
|
38 |
| - cflags = [ "-Wconversion" ] |
| 48 | + cflags = [ "-Wconversion" ] |
| 49 | + } |
39 | 50 | }
|
0 commit comments