Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs][Test driver]Fix efr32 assert due to missing init #33375

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/messaging/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ static_library("helpers") {
chip_test_suite_using_nltest("tests") {
output_name = "libMessagingLayerTests"

test_sources = [ "TestExchange.cpp" ]
test_sources = []

if (chip_device_platform != "efr32") {
# TODO(#10447): ReliableMessage Test has HF, and ExchangeMgr hangs on EFR32.
# And TestAbortExchangesForFabric does not link on EFR32 for some reason.
# TODO #33372: TestExchange.cpp asserts in ExchangeContext::SendMessage
test_sources += [
"TestAbortExchangesForFabric.cpp",
"TestExchange.cpp",
"TestExchangeMgr.cpp",
"TestReliableMessageProtocol.cpp",
]
Expand Down
8 changes: 4 additions & 4 deletions src/platform/silabs/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ static void PrintLog(const char * msg)

#if SILABS_LOG_OUT_UART
uartLogWrite(msg, sz);
#elif PW_RPC_ENABLED
PigweedLogger::putString(msg, sz);
#else
#if PW_RPC_ENABLED
PigweedLogger::putString(msg, sz);
#endif // PW_RPC_ENABLED
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, msg, sz);
#endif // SILABS_LOG_OUT_UART

Expand All @@ -147,9 +148,8 @@ static void PrintLog(const char * msg)
sz = strlen(newline);
#if PW_RPC_ENABLED
PigweedLogger::putString(newline, sz);
#else
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
#endif // PW_RPC_ENABLED
SEGGER_RTT_WriteNoLock(LOG_RTT_BUFFER_INDEX, newline, sz);
#endif
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/test_driver/efr32/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <platform/CHIPDeviceLayer.h>
#include <platform/KeyValueStoreManager.h>
#include <platform/silabs/platformAbstraction/SilabsPlatform.h>
#include <sl_system_init.h>
#include <sl_system_kernel.h>
#include <task.h>

Expand Down Expand Up @@ -185,6 +186,7 @@ void RunRpcService(void *)

int main(void)
{
sl_system_init();
chip::DeviceLayer::Silabs::GetPlatform().Init();
PigweedLogger::init();
mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree);
Expand Down
Loading