tests: logging: log_api: Fix test cases setup
Execute log_setup even when test is skipped. This is especially vital when test infrastructure is using logging (e.g. LOG_PRINT is enabled). Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
be1f0059b9
commit
92fb1af09a
1 changed files with 4 additions and 2 deletions
|
@ -357,6 +357,8 @@ static void test_log_overflow(void)
|
||||||
{
|
{
|
||||||
log_timestamp_t exp_timestamp = TIMESTAMP_INIT_VAL;
|
log_timestamp_t exp_timestamp = TIMESTAMP_INIT_VAL;
|
||||||
|
|
||||||
|
log_setup(false);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
|
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
|
||||||
ztest_test_skip();
|
ztest_test_skip();
|
||||||
}
|
}
|
||||||
|
@ -369,8 +371,6 @@ static void test_log_overflow(void)
|
||||||
data[i] = i;
|
data[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_setup(false);
|
|
||||||
|
|
||||||
uint32_t hexdump_len = get_long_hexdump();
|
uint32_t hexdump_len = get_long_hexdump();
|
||||||
|
|
||||||
/* expect first message to be dropped */
|
/* expect first message to be dropped */
|
||||||
|
@ -591,6 +591,8 @@ static void log_n_messages(uint32_t n_msg, uint32_t exp_dropped)
|
||||||
*/
|
*/
|
||||||
static void test_log_msg_dropped_notification(void)
|
static void test_log_msg_dropped_notification(void)
|
||||||
{
|
{
|
||||||
|
log_setup(false);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
|
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
|
||||||
ztest_test_skip();
|
ztest_test_skip();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue