testsuite: tc_util: Flush logs before posix_exit
Flush all logs before terminating test in posix. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
07e0a5f08a
commit
b85689ba42
1 changed files with 5 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include <shell/shell.h>
|
#include <shell/shell.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/printk.h>
|
#include <sys/printk.h>
|
||||||
|
#include <logging/log_ctrl.h>
|
||||||
|
|
||||||
#if defined CONFIG_ZTEST_TC_UTIL_USER_OVERRIDE
|
#if defined CONFIG_ZTEST_TC_UTIL_USER_OVERRIDE
|
||||||
#include <tc_util_user_override.h>
|
#include <tc_util_user_override.h>
|
||||||
|
@ -174,7 +175,10 @@ static inline void test_time_ms(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_ARCH_POSIX)
|
#if defined(CONFIG_ARCH_POSIX)
|
||||||
#define TC_END_POST(result) posix_exit(result)
|
#define TC_END_POST(result) do { \
|
||||||
|
LOG_PANIC(); \
|
||||||
|
posix_exit(result); \
|
||||||
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define TC_END_POST(result)
|
#define TC_END_POST(result)
|
||||||
#endif /* CONFIG_ARCH_POSIX */
|
#endif /* CONFIG_ARCH_POSIX */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue