Skip to content

Commit fea8046

Browse files
committed
move condition on compilation of TestInetEndPoint to BUILD.gn instead of ifdef
1 parent 0efddcd commit fea8046

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/inet/tests/BUILD.gn

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import("//build_overrides/pigweed.gni")
2020
import("${chip_root}/build/chip/chip_test_suite.gni")
2121
import("${chip_root}/build/chip/tests.gni")
2222
import("${chip_root}/src/platform/device.gni")
23+
import("${chip_root}/src/system/system.gni")
2324

2425
config("tests_config") {
2526
include_dirs = [ "." ]
@@ -78,7 +79,7 @@ chip_test_suite("tests") {
7879
]
7980
sources = []
8081

81-
if (current_os != "zephyr") {
82+
if (chip_system_config_use_sockets && current_os != "zephyr") {
8283
test_sources += [ "TestInetEndPoint.cpp" ]
8384
}
8485

src/inet/tests/TestInetEndPoint.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ using namespace chip::System::Clock::Literals;
4949

5050
#define TOOL_NAME "TestInetEndPoint"
5151

52-
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
53-
5452
bool callbackHandlerCalled = false;
5553

5654
void HandleDNSResolveComplete(void * appState, CHIP_ERROR err, uint8_t addrCount, IPAddress * addrArray)
@@ -446,4 +444,3 @@ TEST_F(TestInetEndPoint, TestInetEndPointLimit)
446444
ShutdownSystemLayer();
447445
}
448446
#endif // !CHIP_SYSTEM_CONFIG_POOL_USE_HEAP
449-
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS

0 commit comments

Comments
 (0)