Skip to content

Commit

Permalink
[nrfconnect] Provide a workaround for nrfconnect Posix unit tests.
Browse files Browse the repository at this point in the history
We need to disable all dependencies to the Zephyr net_if module until
we switch unit tests to it.
  • Loading branch information
ArekBalysNordic committed Mar 27, 2024
1 parent 5944add commit b4f1950
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/platform/nrfconnect/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ static_library("nrfconnect") {
"../Zephyr/ConfigurationManagerImpl.cpp",
"../Zephyr/DiagnosticDataProviderImpl.cpp",
"../Zephyr/DiagnosticDataProviderImpl.h",
"../Zephyr/InetUtils.cpp",
"../Zephyr/InetUtils.h",
"../Zephyr/KeyValueStoreManagerImpl.cpp",
"../Zephyr/Logging.cpp",
"../Zephyr/PlatformManagerImpl.cpp",
Expand Down Expand Up @@ -79,6 +77,13 @@ static_library("nrfconnect") {
]
}

if (chip_enable_openthread || chip_enable_wifi){
sources += [
"../Zephyr/InetUtils.cpp",
"../Zephyr/InetUtils.h",
]
}

if (chip_enable_openthread) {
sources += [
"../OpenThread/OpenThreadUtils.cpp",
Expand Down
2 changes: 2 additions & 0 deletions src/platform/nrfconnect/ConnectivityManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
ReturnErrorOnFailure(InitWiFi());
#endif

#if CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI
UDPEndPointImplSockets::SetMulticastGroupHandler([](InterfaceId interfaceId, const IPAddress & address, bool join) {
if (interfaceId.IsPresent())
{
Expand All @@ -115,6 +116,7 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()

return CHIP_NO_ERROR;
});
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI

return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit b4f1950

Please sign in to comment.