Skip to content

Commit 3b1c60a

Browse files
authored
pw_unit_test migration: inet layer (#33311)
* pw_unit_test migration: inet layer * apply restyled patch * modify test_components.txt for openiot sdk * fix BUILD.gn * only run TestInetEndPoint when CHIP_SYSTEM_CONFIG_USE_SOCKETS 1 * move condition on compilation of TestInetEndPoint to BUILD.gn instead of ifdef
1 parent 3ca3c04 commit 3b1c60a

File tree

7 files changed

+427
-685
lines changed

7 files changed

+427
-685
lines changed

src/inet/tests/BUILD.gn

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717
import("//build_overrides/nlunit_test.gni")
18+
import("//build_overrides/pigweed.gni")
1819

1920
import("${chip_root}/build/chip/chip_test_suite.gni")
2021
import("${chip_root}/build/chip/tests.gni")
2122
import("${chip_root}/src/platform/device.gni")
23+
import("${chip_root}/src/system/system.gni")
2224

2325
config("tests_config") {
2426
include_dirs = [ "." ]
@@ -60,7 +62,7 @@ static_library("helpers") {
6062
]
6163
}
6264

63-
chip_test_suite_using_nltest("tests") {
65+
chip_test_suite("tests") {
6466
output_name = "libInetLayerTests"
6567

6668
public_configs = [ ":tests_config" ]
@@ -69,18 +71,15 @@ chip_test_suite_using_nltest("tests") {
6971
":helpers",
7072
"${chip_root}/src/inet",
7173
"${chip_root}/src/lib/core",
72-
"${chip_root}/src/lib/support:testing_nlunit",
73-
"${nlunit_test_root}:nlunit-test",
7474
]
75-
7675
test_sources = [
7776
"TestBasicPacketFilters.cpp",
7877
"TestInetAddress.cpp",
7978
"TestInetErrorStr.cpp",
8079
]
8180
sources = []
8281

83-
if (current_os != "zephyr") {
82+
if (chip_system_config_use_sockets && current_os != "zephyr") {
8483
test_sources += [ "TestInetEndPoint.cpp" ]
8584
}
8685

src/inet/tests/TestBasicPacketFilters.cpp

+74-122
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)