From c2f58e4379410b33d98534fd0161d4f6b6229536 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Thu, 7 Mar 2024 13:25:18 +0100 Subject: [PATCH] Add pigweed support for nrfconnect (#32460) * Add pigweed support for nrfconnect * Restyled by gn --------- Co-authored-by: Restyled.io --- config/nrfconnect/chip-gn/.gn | 10 ++++++++++ src/BUILD.gn | 3 ++- src/test_driver/nrfconnect/main/runner.cpp | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/config/nrfconnect/chip-gn/.gn b/config/nrfconnect/chip-gn/.gn index bf81e1e8f52cef..b8e1a5a86cc803 100644 --- a/config/nrfconnect/chip-gn/.gn +++ b/config/nrfconnect/chip-gn/.gn @@ -14,6 +14,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") # The location of the build configuration file. buildconfig = "${build_root}/config/BUILDCONFIG.gn" @@ -25,5 +26,14 @@ default_args = { target_cpu = "arm" target_os = "zephyr" + pw_sys_io_BACKEND = dir_pw_sys_io_stdio + pw_assert_BACKEND = dir_pw_assert_log + pw_log_BACKEND = dir_pw_log_basic + + pw_build_LINK_DEPS = [ + "$dir_pw_assert:impl", + "$dir_pw_log:impl", + ] + import("${chip_root}/config/nrfconnect/chip-gn/args.gni") } diff --git a/src/BUILD.gn b/src/BUILD.gn index 77eb8d362aa29a..9b9e993cc10582 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -143,7 +143,8 @@ if (chip_build_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 (chip_device_platform == "esp32") { + if (chip_device_platform == "esp32" || + chip_device_platform == "nrfconnect") { deps += [ "${chip_root}/src/lib/support:pw_tests_wrapper" ] } build_monolithic_library = true diff --git a/src/test_driver/nrfconnect/main/runner.cpp b/src/test_driver/nrfconnect/main/runner.cpp index 99848e423c1390..1cd57d0bbbd406 100644 --- a/src/test_driver/nrfconnect/main/runner.cpp +++ b/src/test_driver/nrfconnect/main/runner.cpp @@ -16,6 +16,7 @@ */ #include +#include #include #include @@ -35,6 +36,7 @@ extern "C" int main(void) LOG_INF("Starting CHIP tests!"); int status = RunRegisteredUnitTests(); + status += chip::test::RunAllTests(); LOG_INF("CHIP test status: %d", status); _exit(status);