Closed Irving-cl closed 1 month ago
Attention: Patch coverage is 65.90909%
with 30 lines
in your changes missing coverage. Please review.
Project coverage is 45.78%. Comparing base (
2b41187
) to head (f9f1517
). Report is 839 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds a unit test framework for testing ThreadHost APIs (RCP).
It's implemeneted by building
rcp_host.cpp
withFakePlatform
in OT. A few small changes are done to make this work:fake_posix_platform.cpp
. (likeotSysInit
,otSysMainloopProcess
)ot::FakePlatform
doesn't include these things and I think it's better to put it here.otbr-common
onopenthread-posix
so that the unit test executable can link to the fake system API implementation instead those inopenthread-posix
.ThreadHost::ConvertToOtLogLevel
tologging.hpp
. Because otherwise we have to buildthread_host.cpp
into the test executable and then have more dependencies on NcpHost.This PR also implements the first unit test case to test the
RcpHost::SetThreadEnabled
method.