From 8850954c6df729b78c3accdf8654257a4f757096 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Thu, 20 Jan 2022 10:49:16 +0100 Subject: [PATCH] testsuite: ztest: Add logs flushing after suite Flushing logs here is especially vital if LOG_PRINTK is enabled. In that case printk goes to log and without flushing after all tests are run you will not get the final report out. Signed-off-by: Krzysztof Chruscinski --- subsys/testsuite/ztest/src/ztest_new.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subsys/testsuite/ztest/src/ztest_new.c b/subsys/testsuite/ztest/src/ztest_new.c index f0722fccba1..8a74e0daaa0 100644 --- a/subsys/testsuite/ztest/src/ztest_new.c +++ b/subsys/testsuite/ztest/src/ztest_new.c @@ -605,6 +605,7 @@ void main(void) z_init_mock(); test_main(); end_report(); + LOG_PANIC(); if (IS_ENABLED(CONFIG_ZTEST_RETEST_IF_PASSED)) { static __noinit struct { uint32_t magic;