From 43159a8d273216545f85515c042d0ccc45993c69 Mon Sep 17 00:00:00 2001 From: Maksymilian Knust <48494224+mbknust@users.noreply.github.com> Date: Tue, 10 Oct 2023 02:26:21 +0200 Subject: [PATCH] Add pw_unit_test support to build configuration (#29479) * Add pw_unit_test support to GN * Rename old chip_test_suite template to chip_test_suite_using_nltest It will be removed in the future, when it's no longer needed. * Make new chip_test_suite template, using pw_test instead of chip_test * Rename a few GN targets to be consistent with pigweed Make them end with `.lib` or `.run` instead of `_lib` or `_run`. * Reordered declarations in .gn for readability * Update .gn --- .gn | 11 ++ build/chip/chip_test.gni | 6 +- build/chip/chip_test_group.gni | 4 +- build/chip/chip_test_suite.gni | 109 ++++++++++++++++-- src/access/tests/BUILD.gn | 2 +- src/app/tests/BUILD.gn | 2 +- src/ble/tests/BUILD.gn | 2 +- src/controller/tests/BUILD.gn | 2 +- src/controller/tests/data_model/BUILD.gn | 2 +- src/credentials/tests/BUILD.gn | 2 +- src/crypto/tests/BUILD.gn | 2 +- src/inet/tests/BUILD.gn | 2 +- src/lib/address_resolve/tests/BUILD.gn | 2 +- src/lib/asn1/tests/BUILD.gn | 2 +- src/lib/core/tests/BUILD.gn | 2 +- .../dnssd/minimal_mdns/core/tests/BUILD.gn | 2 +- .../dnssd/minimal_mdns/records/tests/BUILD.gn | 2 +- .../minimal_mdns/responders/tests/BUILD.gn | 2 +- src/lib/dnssd/minimal_mdns/tests/BUILD.gn | 2 +- src/lib/dnssd/platform/tests/BUILD.gn | 2 +- src/lib/dnssd/tests/BUILD.gn | 2 +- src/lib/format/tests/BUILD.gn | 2 +- src/lib/shell/tests/BUILD.gn | 2 +- src/lib/support/tests/BUILD.gn | 2 +- src/messaging/tests/BUILD.gn | 2 +- src/platform/tests/BUILD.gn | 2 +- src/protocols/bdx/tests/BUILD.gn | 2 +- src/protocols/secure_channel/tests/BUILD.gn | 4 +- .../tests/BUILD.gn | 2 +- src/setup_payload/tests/BUILD.gn | 2 +- src/system/tests/BUILD.gn | 2 +- src/tracing/tests/BUILD.gn | 2 +- src/transport/raw/tests/BUILD.gn | 2 +- src/transport/retransmit/tests/BUILD.gn | 2 +- src/transport/tests/BUILD.gn | 2 +- 35 files changed, 150 insertions(+), 44 deletions(-) diff --git a/.gn b/.gn index 742fdc4273d666..b9586c7fce69ea 100644 --- a/.gn +++ b/.gn @@ -31,4 +31,15 @@ default_args = { # GN target to use for the default Python build venv. pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv" + + # Required for pw_unit_test + pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" + pw_assert_BACKEND = "$dir_pw_assert_log" + pw_log_BACKEND = "$dir_pw_log_basic" + + # TODO: Make sure only unit tests link against this + pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", + ] } diff --git a/build/chip/chip_test.gni b/build/chip/chip_test.gni index 8c0d498bb68074..b5b32f24d0b0b7 100644 --- a/build/chip/chip_test.gni +++ b/build/chip/chip_test.gni @@ -38,11 +38,11 @@ if (chip_link_tests) { output_dir = _test_output_dir } - group(_test_name + "_lib") { + group(_test_name + ".lib") { } if (chip_pw_run_tests) { - pw_python_action(_test_name + "_run") { + pw_python_action(_test_name + ".run") { deps = [ ":${_test_name}" ] inputs = [ pw_unit_test_AUTOMATIC_RUNNER ] module = "pw_unit_test.test_runner" @@ -64,7 +64,7 @@ if (chip_link_tests) { template("chip_test") { group(target_name) { } - group(target_name + "_lib") { + group(target_name + ".lib") { } not_needed(invoker, "*") } diff --git a/build/chip/chip_test_group.gni b/build/chip/chip_test_group.gni index aa0bc841ec5ac1..bc092c46ab6bcd 100644 --- a/build/chip/chip_test_group.gni +++ b/build/chip/chip_test_group.gni @@ -31,7 +31,7 @@ template("chip_test_group") { _target_type = "group" } - _lib_target_name = "${_test_group_name}_lib" + _lib_target_name = "${_test_group_name}.lib" target(_target_type, _lib_target_name) { forward_variables_from(invoker, @@ -43,7 +43,7 @@ template("chip_test_group") { deps = [] foreach(_test, invoker.deps) { - deps += [ get_label_info(_test, "label_no_toolchain") + "_lib" ] + deps += [ get_label_info(_test, "label_no_toolchain") + ".lib" ] } if (_build_monolithic_library && chip_build_test_static_libraries) { diff --git a/build/chip/chip_test_suite.gni b/build/chip/chip_test_suite.gni index 1640988016c25f..596642d5335241 100644 --- a/build/chip/chip_test_suite.gni +++ b/build/chip/chip_test_suite.gni @@ -85,7 +85,7 @@ template("chip_test_suite") { } else { _target_type = "source_set" } - target(_target_type, "${_suite_name}_lib") { + target(_target_type, "${_suite_name}.lib") { forward_variables_from(invoker, "*", [ "tests" ]) output_dir = "${root_out_dir}/lib" @@ -99,7 +99,104 @@ template("chip_test_suite") { public_deps += [ "${chip_root}/src/platform/logging:force_stdio" ] } } + if (chip_link_tests) { + tests = [] + + if (defined(invoker.test_sources)) { + foreach(_test, invoker.test_sources) { + _test_name = string_replace(_test, ".cpp", "") + + pw_test(_test_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "cflags", + "configs", + ]) + public_deps += [ ":${_suite_name}.lib" ] + sources = [ _test ] + } + tests += [ _test_name ] + } + } + + if (defined(invoker.tests)) { + foreach(_test, invoker.tests) { + pw_test(_test) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "cflags", + "configs", + ]) + public_deps += [ ":${_suite_name}.lib" ] + test_main = "" + sources = [ + "${_test}.cpp", + "${_test}Driver.cpp", + ] + } + tests += [ _test ] + } + } + group(_suite_name) { + deps = [] + foreach(_test, tests) { + deps += [ ":${_test}" ] + } + } + + if (chip_pw_run_tests) { + group("${_suite_name}_run") { + deps = [] + foreach(_test, tests) { + deps += [ ":${_test}.run" ] + } + } + } + } else { + group(_suite_name) { + deps = [ ":${_suite_name}.lib" ] + } + } +} + +# TODO: remove this once transition away from nlunit-test is completed +template("chip_test_suite_using_nltest") { + _suite_name = target_name + + # Ensures that the common library has sources containing both common + # and individual unit tests. + if (!defined(invoker.sources)) { + invoker.sources = [] + } + + if (defined(invoker.test_sources)) { + invoker.sources += invoker.test_sources + } + + if (chip_build_test_static_libraries) { + _target_type = "static_library" + } else { + _target_type = "source_set" + } + target(_target_type, "${_suite_name}.lib") { + forward_variables_from(invoker, "*", [ "tests" ]) + + output_dir = "${root_out_dir}/lib" + + if (!defined(invoker.public_deps)) { + public_deps = [] + } + + if (current_os != "zephyr" && current_os != "mbed") { + # Depend on stdio logging, and have it take precedence over the default platform backend + public_deps += [ "${chip_root}/src/platform/logging:force_stdio" ] + } + } if (chip_link_tests) { tests = [] @@ -123,11 +220,10 @@ template("chip_test_suite") { chip_test(_test_name) { sources = [ _driver_name ] public_deps = [ - ":${_suite_name}_lib", + ":${_suite_name}.lib", ":${_test_name}_generate_driver", ] } - tests += [ _test_name ] } } @@ -137,9 +233,8 @@ template("chip_test_suite") { chip_test(_test) { sources = [ "${_test}Driver.cpp" ] - public_deps = [ ":${_suite_name}_lib" ] + public_deps = [ ":${_suite_name}.lib" ] } - tests += [ _test ] } } @@ -155,13 +250,13 @@ template("chip_test_suite") { group("${_suite_name}_run") { deps = [] foreach(_test, tests) { - deps += [ ":${_test}_run" ] + deps += [ ":${_test}.run" ] } } } } else { group(_suite_name) { - deps = [ ":${_suite_name}_lib" ] + deps = [ ":${_suite_name}.lib" ] } } } diff --git a/src/access/tests/BUILD.gn b/src/access/tests/BUILD.gn index 75888a3d9c76e6..371b75404c50a6 100644 --- a/src/access/tests/BUILD.gn +++ b/src/access/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libaccesstest" test_sources = [ "TestAccessControl.cpp" ] diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 65ea68ff53eee4..e56a91aaff1383 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -117,7 +117,7 @@ source_set("operational-state-test-srcs") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libAppTests" test_sources = [ diff --git a/src/ble/tests/BUILD.gn b/src/ble/tests/BUILD.gn index 658f5094cc3141..f8230f36aaa555 100644 --- a/src/ble/tests/BUILD.gn +++ b/src/ble/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libBleLayerTests" test_sources = [ diff --git a/src/controller/tests/BUILD.gn b/src/controller/tests/BUILD.gn index f3ae7c761cb186..d7b212d74bd3c7 100644 --- a/src/controller/tests/BUILD.gn +++ b/src/controller/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libControllerTests" test_sources = [ "TestCommissionableNodeController.cpp" ] diff --git a/src/controller/tests/data_model/BUILD.gn b/src/controller/tests/data_model/BUILD.gn index 1edad7a82c9736..503870de6b296a 100644 --- a/src/controller/tests/data_model/BUILD.gn +++ b/src/controller/tests/data_model/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/src/platform/device.gni") -chip_test_suite("data_model") { +chip_test_suite_using_nltest("data_model") { output_name = "libDataModelTests" if (chip_device_platform != "mbed" && chip_device_platform != "efr32" && diff --git a/src/credentials/tests/BUILD.gn b/src/credentials/tests/BUILD.gn index 05b58b9f3f0441..81a876058b7611 100644 --- a/src/credentials/tests/BUILD.gn +++ b/src/credentials/tests/BUILD.gn @@ -42,7 +42,7 @@ static_library("cert_test_vectors") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libCredentialsTest" output_dir = "${root_out_dir}/lib" diff --git a/src/crypto/tests/BUILD.gn b/src/crypto/tests/BUILD.gn index cc08520c6dfbbf..e8770010da7aca 100644 --- a/src/crypto/tests/BUILD.gn +++ b/src/crypto/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/src/crypto/crypto.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libChipCryptoTests" sources = [ diff --git a/src/inet/tests/BUILD.gn b/src/inet/tests/BUILD.gn index 774d6af52d2a54..df98b8ee30deb6 100644 --- a/src/inet/tests/BUILD.gn +++ b/src/inet/tests/BUILD.gn @@ -60,7 +60,7 @@ static_library("helpers") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libInetLayerTests" public_configs = [ ":tests_config" ] diff --git a/src/lib/address_resolve/tests/BUILD.gn b/src/lib/address_resolve/tests/BUILD.gn index cd4327d9b4797a..5779e929df0fa7 100644 --- a/src/lib/address_resolve/tests/BUILD.gn +++ b/src/lib/address_resolve/tests/BUILD.gn @@ -20,7 +20,7 @@ import("${chip_root}/src/lib/address_resolve/address_resolve.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libAddressResolveTests" if (chip_address_resolve_strategy == "default") { diff --git a/src/lib/asn1/tests/BUILD.gn b/src/lib/asn1/tests/BUILD.gn index 6770bfa39a8552..1d05ecc7aa1bae 100644 --- a/src/lib/asn1/tests/BUILD.gn +++ b/src/lib/asn1/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libASN1Tests" test_sources = [ "TestASN1.cpp" ] diff --git a/src/lib/core/tests/BUILD.gn b/src/lib/core/tests/BUILD.gn index ec83bc715411c1..d7f81eac5c2362 100644 --- a/src/lib/core/tests/BUILD.gn +++ b/src/lib/core/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/build/chip/fuzz_test.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libCoreTests" test_sources = [ diff --git a/src/lib/dnssd/minimal_mdns/core/tests/BUILD.gn b/src/lib/dnssd/minimal_mdns/core/tests/BUILD.gn index 4afc53636e1d58..d811a8f9634394 100644 --- a/src/lib/dnssd/minimal_mdns/core/tests/BUILD.gn +++ b/src/lib/dnssd/minimal_mdns/core/tests/BUILD.gn @@ -27,7 +27,7 @@ source_set("support") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMinimalMdnsCoreTests" test_sources = [ diff --git a/src/lib/dnssd/minimal_mdns/records/tests/BUILD.gn b/src/lib/dnssd/minimal_mdns/records/tests/BUILD.gn index 28febc4a1e9a30..71cf0f0e43fd61 100644 --- a/src/lib/dnssd/minimal_mdns/records/tests/BUILD.gn +++ b/src/lib/dnssd/minimal_mdns/records/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMinimalMdnsRecordsTests" test_sources = [ diff --git a/src/lib/dnssd/minimal_mdns/responders/tests/BUILD.gn b/src/lib/dnssd/minimal_mdns/responders/tests/BUILD.gn index a657151d1d9709..f0205b1b2fd921 100644 --- a/src/lib/dnssd/minimal_mdns/responders/tests/BUILD.gn +++ b/src/lib/dnssd/minimal_mdns/responders/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMinimalMdnsRespondersTests" test_sources = [ diff --git a/src/lib/dnssd/minimal_mdns/tests/BUILD.gn b/src/lib/dnssd/minimal_mdns/tests/BUILD.gn index d99838ba1fb8af..0d625ea4c16b51 100644 --- a/src/lib/dnssd/minimal_mdns/tests/BUILD.gn +++ b/src/lib/dnssd/minimal_mdns/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/build/chip/fuzz_test.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMinimalMdnstests" test_sources = [ diff --git a/src/lib/dnssd/platform/tests/BUILD.gn b/src/lib/dnssd/platform/tests/BUILD.gn index 868691dc74a231..6166a0588baf24 100644 --- a/src/lib/dnssd/platform/tests/BUILD.gn +++ b/src/lib/dnssd/platform/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMdnsFakePlatformTests" if (chip_device_platform == "fake") { test_sources = [ "TestPlatform.cpp" ] diff --git a/src/lib/dnssd/tests/BUILD.gn b/src/lib/dnssd/tests/BUILD.gn index 04a88ec04329ef..9c7c071038638b 100644 --- a/src/lib/dnssd/tests/BUILD.gn +++ b/src/lib/dnssd/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMdnsTests" test_sources = [ diff --git a/src/lib/format/tests/BUILD.gn b/src/lib/format/tests/BUILD.gn index 90428b5a575912..4fdf1d20f11089 100644 --- a/src/lib/format/tests/BUILD.gn +++ b/src/lib/format/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/build/chip/fuzz_test.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libFormatTests" test_sources = [ diff --git a/src/lib/shell/tests/BUILD.gn b/src/lib/shell/tests/BUILD.gn index 73eadd50c63b57..62e062b67a5ab4 100644 --- a/src/lib/shell/tests/BUILD.gn +++ b/src/lib/shell/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libTestShell" test_sources = [ diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index 1ef6db03710146..49147e7814dab8 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libSupportTests" test_sources = [ diff --git a/src/messaging/tests/BUILD.gn b/src/messaging/tests/BUILD.gn index 15c7dbdc02eb74..38ece653fe2f53 100644 --- a/src/messaging/tests/BUILD.gn +++ b/src/messaging/tests/BUILD.gn @@ -40,7 +40,7 @@ static_library("helpers") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libMessagingLayerTests" test_sources = [] diff --git a/src/platform/tests/BUILD.gn b/src/platform/tests/BUILD.gn index 70d096556ed579..d5b4ebf1f60048 100644 --- a/src/platform/tests/BUILD.gn +++ b/src/platform/tests/BUILD.gn @@ -27,7 +27,7 @@ declare_args() { if (chip_device_platform != "none" && chip_device_platform != "fake") { import("${chip_root}/build/chip/chip_test_suite.gni") - chip_test_suite("tests") { + chip_test_suite_using_nltest("tests") { output_name = "libPlatformTests" test_sources = [] diff --git a/src/protocols/bdx/tests/BUILD.gn b/src/protocols/bdx/tests/BUILD.gn index 5307b1dbb82ec1..25ef3e13dc8459 100644 --- a/src/protocols/bdx/tests/BUILD.gn +++ b/src/protocols/bdx/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libBDXTests" test_sources = [ diff --git a/src/protocols/secure_channel/tests/BUILD.gn b/src/protocols/secure_channel/tests/BUILD.gn index 5c3ec4a30696c3..74d71428a5daa4 100644 --- a/src/protocols/secure_channel/tests/BUILD.gn +++ b/src/protocols/secure_channel/tests/BUILD.gn @@ -5,7 +5,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libSecureChannelTests" test_sources = [ @@ -23,7 +23,7 @@ chip_test_suite("tests") { public_deps = [ "${chip_root}/src/credentials/tests:cert_test_vectors", - "${chip_root}/src/crypto/tests:tests_lib", + "${chip_root}/src/crypto/tests:tests.lib", "${chip_root}/src/lib/core", "${chip_root}/src/lib/support", "${chip_root}/src/lib/support:testing", diff --git a/src/protocols/user_directed_commissioning/tests/BUILD.gn b/src/protocols/user_directed_commissioning/tests/BUILD.gn index fb1859834de8cd..555398cb89064c 100644 --- a/src/protocols/user_directed_commissioning/tests/BUILD.gn +++ b/src/protocols/user_directed_commissioning/tests/BUILD.gn @@ -17,7 +17,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libUserDirectedCommissioningTests" test_sources = [ "TestUdcMessages.cpp" ] diff --git a/src/setup_payload/tests/BUILD.gn b/src/setup_payload/tests/BUILD.gn index 1b39f08f0eca25..3069685cd4f5a3 100644 --- a/src/setup_payload/tests/BUILD.gn +++ b/src/setup_payload/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libSetupPayloadTests" test_sources = [ diff --git a/src/system/tests/BUILD.gn b/src/system/tests/BUILD.gn index 1fb0a8f708b7a9..dca5d09bcdbcbc 100644 --- a/src/system/tests/BUILD.gn +++ b/src/system/tests/BUILD.gn @@ -18,7 +18,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libSystemLayerTests" test_sources = [ diff --git a/src/tracing/tests/BUILD.gn b/src/tracing/tests/BUILD.gn index 8d193e538e04fd..dc2d3df4ef08db 100644 --- a/src/tracing/tests/BUILD.gn +++ b/src/tracing/tests/BUILD.gn @@ -20,7 +20,7 @@ import("${chip_root}/build/chip/chip_test_suite.gni") import("${chip_root}/src/tracing/tracing_args.gni") if (matter_enable_tracing_support && matter_trace_config == "multiplexed") { - chip_test_suite("tests") { + chip_test_suite_using_nltest("tests") { output_name = "libTracingTests" test_sources = [ "TestTracing.cpp" ] diff --git a/src/transport/raw/tests/BUILD.gn b/src/transport/raw/tests/BUILD.gn index 0e59000010f913..f6089a7d508ba0 100644 --- a/src/transport/raw/tests/BUILD.gn +++ b/src/transport/raw/tests/BUILD.gn @@ -36,7 +36,7 @@ static_library("helpers") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libRawTransportTests" test_sources = [ diff --git a/src/transport/retransmit/tests/BUILD.gn b/src/transport/retransmit/tests/BUILD.gn index 077928b1b3dcaf..f261024e1e50ee 100644 --- a/src/transport/retransmit/tests/BUILD.gn +++ b/src/transport/retransmit/tests/BUILD.gn @@ -19,7 +19,7 @@ import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libRetransmitTests" cflags = [ "-Wconversion" ] diff --git a/src/transport/tests/BUILD.gn b/src/transport/tests/BUILD.gn index b939287a2febdb..620049f5d29a38 100644 --- a/src/transport/tests/BUILD.gn +++ b/src/transport/tests/BUILD.gn @@ -29,7 +29,7 @@ source_set("helpers") { ] } -chip_test_suite("tests") { +chip_test_suite_using_nltest("tests") { output_name = "libTransportLayerTests" test_sources = [