tests: coverage: exclude the CODE UNREACHABLE of code coverage

1. Exclude the CODE UNREACHABLE line while generating coverage report.
2. Exclude the memory domain deprecated API when calculating code
coverage.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
This commit is contained in:
Enjia Mai 2021-01-15 17:09:58 +08:00 committed by Anas Nashif
commit 53ca709828
10 changed files with 11 additions and 9 deletions

View file

@ -267,6 +267,7 @@ void k_mem_domain_add_thread(struct k_mem_domain *domain, k_tid_t thread)
k_spin_unlock(&z_mem_domain_lock, key);
}
/* LCOV_EXCL_START */
void k_mem_domain_remove_thread(k_tid_t thread)
{
k_mem_domain_add_thread(&k_mem_domain_default, thread);
@ -297,6 +298,7 @@ void k_mem_domain_destroy(struct k_mem_domain *domain)
k_spin_unlock(&z_mem_domain_lock, key);
}
/* LCOV_EXCL_STOP */
static int init_mem_domain_module(const struct device *arg)
{