Add testing_pw library (#31550)
* Add unity test run method
* Add if statement with list of supported platform in pigweed
* Make Tizen build only targets related to unit tests
* Update library name
diff --git a/src/BUILD.gn b/src/BUILD.gn
index c074f5e..ee3fd4d 100644
--- a/src/BUILD.gn
+++ b/src/BUILD.gn
@@ -56,7 +56,8 @@
import("${chip_root}/build/chip/chip_test_group.gni")
chip_test_group("tests") {
- deps = [
+ deps = []
+ tests = [
"${chip_root}/src/access/tests",
"${chip_root}/src/crypto/tests",
"${chip_root}/src/inet/tests",
@@ -72,7 +73,7 @@
# Skip DNSSD tests for Mbed platform due to flash memory size limitations
if (current_os != "mbed") {
- deps += [
+ tests += [
"${chip_root}/src/lib/dnssd/minimal_mdns/core/tests",
"${chip_root}/src/lib/dnssd/minimal_mdns/responders/tests",
"${chip_root}/src/lib/dnssd/minimal_mdns/tests",
@@ -81,19 +82,19 @@
}
if (current_os != "zephyr" && current_os != "mbed") {
- deps += [ "${chip_root}/src/lib/dnssd/minimal_mdns/records/tests" ]
+ tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/records/tests" ]
}
if (current_os != "zephyr" && current_os != "mbed" &&
chip_device_platform != "efr32") {
- deps += [
+ tests += [
"${chip_root}/src/setup_payload/tests",
"${chip_root}/src/transport/raw/tests",
]
}
if (chip_device_platform != "efr32") {
- deps += [
+ tests += [
# TODO(#10447): App test has HF on EFR32.
"${chip_root}/src/app/tests",
"${chip_root}/src/credentials/tests",
@@ -106,21 +107,21 @@
if (matter_enable_tracing_support &&
matter_trace_config == "multiplexed") {
- deps += [ "${chip_root}/src/tracing/tests" ]
+ tests += [ "${chip_root}/src/tracing/tests" ]
}
}
if (chip_device_platform != "none") {
- deps += [ "${chip_root}/src/lib/dnssd/minimal_mdns/tests" ]
+ tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/tests" ]
}
if (chip_device_platform != "esp32" && chip_device_platform != "efr32" &&
chip_device_platform != "ameba") {
- deps += [ "${chip_root}/src/platform/tests" ]
+ tests += [ "${chip_root}/src/platform/tests" ]
}
if (chip_config_network_layer_ble) {
- deps += [ "${chip_root}/src/ble/tests" ]
+ tests += [ "${chip_root}/src/ble/tests" ]
}
# On nrfconnect, the controller tests run into
@@ -128,21 +129,26 @@
if (chip_device_platform != "nrfconnect" &&
chip_device_platform != "efr32") {
# TODO(#10447): Controller test has HF on EFR32.
- deps += [ "${chip_root}/src/controller/tests/data_model" ]
+ tests += [ "${chip_root}/src/controller/tests/data_model" ]
# Skip controller test for Open IoT SDK
# https://github.com/project-chip/connectedhomeip/issues/23747
if (chip_device_platform != "openiotsdk") {
- deps += [ "${chip_root}/src/controller/tests" ]
+ tests += [ "${chip_root}/src/controller/tests" ]
}
}
if (current_os != "zephyr" && current_os != "mbed" &&
chip_device_platform != "esp32" && chip_device_platform != "ameba") {
- deps += [ "${chip_root}/src/lib/shell/tests" ]
+ tests += [ "${chip_root}/src/lib/shell/tests" ]
}
if (chip_monolithic_tests) {
+ # TODO [PW_MIGRATION] Remove this if after migartion to PW_TEST is completed for all platforms
+ # TODO [PW_MIGRATION] There will be a list of already migrated platforms
+ if (false) {
+ deps += [ "${chip_root}/src/lib/support:pw_tests_wrapper" ]
+ }
build_monolithic_library = true
output_name = "libCHIP_tests"
output_dir = "${root_out_dir}/lib"
@@ -150,12 +156,12 @@
}
chip_test_group("fake_platform_tests") {
- deps = [ "${chip_root}/src/lib/dnssd/platform/tests" ]
+ tests = [ "${chip_root}/src/lib/dnssd/platform/tests" ]
}
# Tests to run with each Crypto PAL
chip_test_group("crypto_tests") {
- deps = [
+ tests = [
"${chip_root}/src/credentials/tests",
"${chip_root}/src/crypto/tests",
]