Skip to content

Commit

Permalink
tests: logging: Add a clean ouput test and clarify output
Browse files Browse the repository at this point in the history
Add a new test with clean output and warn the user that the version
without clean output will output garbled text.

Fixes zephyrproject-rtos#23799

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi committed May 25, 2020
1 parent dd1a71f commit 855b6c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/subsys/logging/log_immediate/src/log_immediate_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ static void thread_func(void *p1, void *p2, void *p3)
*/
static void test_log_immediate_preemption(void)
{
if (!IS_ENABLED(CONFIG_LOG_IMMEDIATE_CLEAN_OUTPUT)) {
LOG_INF("CONFIG_LOG_IMMEDIATE_CLEAN_OUTPUT not enabled."
" Text output will be garbled.");
}
for (intptr_t i = 0; i < NUM_THREADS; i++) {
tids[i] = k_thread_create(&threads[i], stacks[i], STACK_SIZE,
thread_func, (void *)i, NULL, NULL,
Expand Down
5 changes: 5 additions & 0 deletions tests/subsys/logging/log_immediate/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ tests:
tags: log_core logging
platform_exclude: nucleo_l053r8 nucleo_f030r8
stm32f0_disco nrf52_bsim
logging.log_immediate.clean_output:
extra_args: CONFIG_LOG_IMMEDIATE_CLEAN_OUTPUT=y
tags: log_core logging
platform_exclude: nucleo_l053r8 nucleo_f030r8
stm32f0_disco nrf52_bsim

0 comments on commit 855b6c1

Please sign in to comment.