mirror of
https://github.com/espressif/openthread.git
synced 2026-08-24 11:19:51 +00:00
[coverage] exclude logging code from coverage report (#3947)
This commit is contained in:
@@ -170,6 +170,8 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_CORE == 1)
|
||||
|
||||
void Notifier::LogChangedFlags(otChangedFlags aFlags) const
|
||||
@@ -335,4 +337,6 @@ const char *Notifier::FlagToString(otChangedFlags) const
|
||||
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_CORE == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ot
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
|
||||
namespace ot {
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_UTIL != 0)
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO)
|
||||
|
||||
@@ -88,6 +90,8 @@ void SettingsBase::LogFailure(otError error, const char *aText, bool aIsDelete)
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_WARN)
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_UTIL != 0)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
void Settings::Init(void)
|
||||
{
|
||||
otPlatSettingsInit(&GetInstance());
|
||||
|
||||
@@ -206,7 +206,10 @@ void LinkRaw::InvokeEnergyScanDone(int8_t aEnergyScanMaxRssi)
|
||||
}
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
void LinkRaw::RecordFrameTransmitStatus(const Frame &aFrame,
|
||||
const Frame *aAckFrame,
|
||||
otError aError,
|
||||
@@ -222,8 +225,11 @@ void LinkRaw::RecordFrameTransmitStatus(const Frame &aFrame,
|
||||
aFrame.GetMaxFrameRetries(), aFrame.ToInfoString().AsCString());
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace Mac
|
||||
} // namespace ot
|
||||
|
||||
|
||||
@@ -1835,6 +1835,10 @@ int8_t Mac::GetNoiseFloor(void)
|
||||
return otPlatRadioGetReceiveSensitivity(&GetInstance());
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
const char *Mac::OperationToString(Operation aOperation)
|
||||
{
|
||||
const char *retval = "";
|
||||
@@ -1877,8 +1881,6 @@ const char *Mac::OperationToString(Operation aOperation)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
void Mac::LogFrameRxFailure(const Frame *aFrame, otError aError) const
|
||||
{
|
||||
otLogLevel logLevel;
|
||||
@@ -1934,6 +1936,8 @@ void Mac::LogFrameTxFailure(const Frame &, otError, uint8_t) const
|
||||
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_TIME_SYNC
|
||||
void Mac::ProcessTimeIe(Frame &aFrame)
|
||||
{
|
||||
|
||||
@@ -1058,6 +1058,10 @@ uint16_t Frame::GetFcsSize(void) const
|
||||
return kFcsSize;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
Frame::InfoString Frame::ToInfoString(void) const
|
||||
{
|
||||
InfoString string;
|
||||
@@ -1132,5 +1136,9 @@ BeaconPayload::InfoString BeaconPayload::ToInfoString(void) const
|
||||
IsNative() ? "yes" : "no");
|
||||
}
|
||||
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace Mac
|
||||
} // namespace ot
|
||||
|
||||
@@ -574,6 +574,8 @@ void SubMac::SetState(State aState)
|
||||
}
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
const char *SubMac::StateToString(State aState)
|
||||
{
|
||||
const char *str = "Unknown";
|
||||
@@ -603,6 +605,8 @@ const char *SubMac::StateToString(State aState)
|
||||
return str;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
// otPlatRadio callbacks
|
||||
|
||||
|
||||
@@ -637,6 +637,8 @@ void Joiner::HandleTimer(void)
|
||||
Finish(error);
|
||||
}
|
||||
|
||||
// LOCV_EXCL_START
|
||||
|
||||
const char *Joiner::JoinerStateToString(otJoinerState aState)
|
||||
{
|
||||
const char *str = "Unknown";
|
||||
@@ -681,6 +683,8 @@ exit:
|
||||
}
|
||||
#endif
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace MeshCoP
|
||||
} // namespace ot
|
||||
|
||||
|
||||
@@ -1080,6 +1080,8 @@ exit:
|
||||
return rval;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
const char *Ip6::IpProtoToString(IpProto aIpProto)
|
||||
{
|
||||
const char *retval;
|
||||
@@ -1130,5 +1132,7 @@ const char *Ip6::IpProtoToString(IpProto aIpProto)
|
||||
return retval;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace Ip6
|
||||
} // namespace ot
|
||||
|
||||
@@ -1549,6 +1549,8 @@ exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
otError MeshForwarder::ParseIp6UdpTcpHeader(const Message &aMessage,
|
||||
@@ -1802,7 +1804,7 @@ void MeshForwarder::LogLowpanHcFrameDrop(otError aError,
|
||||
aIsSecure ? "yes" : "no");
|
||||
}
|
||||
|
||||
#else // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
#else // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
void MeshForwarder::LogMessage(MessageAction, const Message &, const Mac::Address *, otError)
|
||||
{
|
||||
@@ -1825,6 +1827,8 @@ void MeshForwarder::LogLowpanHcFrameDrop(otError, uint16_t, const Mac::Address &
|
||||
{
|
||||
}
|
||||
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ot
|
||||
|
||||
@@ -1228,6 +1228,8 @@ exit:
|
||||
}
|
||||
#endif // OPENTHREAD_ENABLE_SERVICE
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
otError MeshForwarder::LogMeshFragmentHeader(MessageAction aAction,
|
||||
@@ -1408,6 +1410,8 @@ exit:
|
||||
|
||||
#endif // #if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MAC == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
} // namespace ot
|
||||
|
||||
#endif // OPENTHREAD_FTD
|
||||
|
||||
@@ -4190,7 +4190,10 @@ const char *Mle::RoleToString(otDeviceRole aRole)
|
||||
return roleString;
|
||||
}
|
||||
|
||||
// LCOV_EXCL_START
|
||||
|
||||
#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MLE == 1)
|
||||
|
||||
const char *Mle::AttachModeToString(AttachMode aMode)
|
||||
{
|
||||
const char *str = "unknown";
|
||||
@@ -4287,6 +4290,8 @@ const char *Mle::ReattachStateToString(ReattachState aState)
|
||||
|
||||
#endif // (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MLE == 1)
|
||||
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
void Mle::RegisterParentResponseStatsCallback(otThreadParentResponseCallback aCallback, void *aContext)
|
||||
{
|
||||
mParentResponseCb = aCallback;
|
||||
|
||||
+2
-2
@@ -1114,7 +1114,7 @@ spinel_ssize_t spinel_datatype_vpack(uint8_t * data_out,
|
||||
// ----------------------------------------------------------------------------
|
||||
// MARK: -
|
||||
|
||||
// **** LCOV_EXCL_START ****
|
||||
// LCOV_EXCL_START
|
||||
|
||||
const char *spinel_command_to_cstr(unsigned int command)
|
||||
{
|
||||
@@ -2619,7 +2619,7 @@ const char *spinel_capability_to_cstr(unsigned int capability)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// **** LCOV_EXCL_STOP ****
|
||||
// LCOV_EXCL_STOP
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user