Skip to content

Commit c2f58e4

Browse files
Add pigweed support for nrfconnect (project-chip#32460)
* Add pigweed support for nrfconnect * Restyled by gn --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 873e665 commit c2f58e4

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

config/nrfconnect/chip-gn/.gn

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
17+
import("//build_overrides/pigweed.gni")
1718

1819
# The location of the build configuration file.
1920
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
@@ -25,5 +26,14 @@ default_args = {
2526
target_cpu = "arm"
2627
target_os = "zephyr"
2728

29+
pw_sys_io_BACKEND = dir_pw_sys_io_stdio
30+
pw_assert_BACKEND = dir_pw_assert_log
31+
pw_log_BACKEND = dir_pw_log_basic
32+
33+
pw_build_LINK_DEPS = [
34+
"$dir_pw_assert:impl",
35+
"$dir_pw_log:impl",
36+
]
37+
2838
import("${chip_root}/config/nrfconnect/chip-gn/args.gni")
2939
}

src/BUILD.gn

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ if (chip_build_tests) {
143143
if (chip_monolithic_tests) {
144144
# TODO [PW_MIGRATION] Remove this if after migartion to PW_TEST is completed for all platforms
145145
# TODO [PW_MIGRATION] There will be a list of already migrated platforms
146-
if (chip_device_platform == "esp32") {
146+
if (chip_device_platform == "esp32" ||
147+
chip_device_platform == "nrfconnect") {
147148
deps += [ "${chip_root}/src/lib/support:pw_tests_wrapper" ]
148149
}
149150
build_monolithic_library = true

src/test_driver/nrfconnect/main/runner.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include <lib/support/CodeUtils.h>
19+
#include <lib/support/UnitTest.h>
1920
#include <lib/support/UnitTestRegistration.h>
2021
#include <platform/CHIPDeviceLayer.h>
2122

@@ -35,6 +36,7 @@ extern "C" int main(void)
3536

3637
LOG_INF("Starting CHIP tests!");
3738
int status = RunRegisteredUnitTests();
39+
status += chip::test::RunAllTests();
3840
LOG_INF("CHIP test status: %d", status);
3941

4042
_exit(status);

0 commit comments

Comments
 (0)