chore: exclude a bunch of code that doesn't need to be tested from codecov (#5721)

* exclude the bulk of HostFunc.h from codecov

* fix codecov (maybe)

* adjust

* more codecov excl
This commit is contained in:
Mayukha Vadari
2025-08-26 15:04:27 -04:00
committed by GitHub
parent 2399d90334
commit 8c38ef726b
2 changed files with 14 additions and 4 deletions

View File

@@ -99,6 +99,7 @@ floatLogImpl(Slice const& x, int32_t mode);
struct HostFunctions
{
// LCOV_EXCL_START
virtual void
setRT(void const*)
{
@@ -519,6 +520,7 @@ struct HostFunctions
}
virtual ~HostFunctions() = default;
// LCOV_EXCL_STOP
};
} // namespace ripple

View File

@@ -35,6 +35,7 @@ namespace ripple {
namespace {
// LCOV_EXCL_START
static log_level_t
getLogLevel(beast::severities::Severity severity)
{
@@ -155,6 +156,7 @@ print_wasm_error(std::string_view msg, wasm_trap_t* trap, beast::Journal jlog)
j << std::endl;
#endif
}
// LCOV_EXCL_STOP
} // namespace
@@ -525,14 +527,20 @@ ModuleWrapper::buildImports(
imp.udata,
nullptr);
if (!func)
{
// LCOV_EXCL_START
throw std::runtime_error(
"can't create import function " +
imp.name); // LCOV_EXCL_LINE
"can't create import function " + imp.name);
// LCOV_EXCL_STOP
}
if (imp.gas && !wasm_func_set_gas(func, imp.gas))
{
// LCOV_EXCL_START
throw std::runtime_error(
"can't set gas for import function " +
imp.name); // LCOV_EXCL_LINE
"can't set gas for import function " + imp.name);
// LCOV_EXCL_STOP
}
wimports.data[i] = wasm_func_as_extern(func);
++impCnt;