Skip to content

Commit

Permalink
tests: enable log in immediate mode by default
Browse files Browse the repository at this point in the history
Fatal error reporting now only dumps to the log mechanism,
so enable it in immediate mode for all tests to ensure
that fatal errors are visible and no messages are lost.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information
Andrew Boie authored and nashif committed Sep 12, 2019
1 parent c4befd5 commit 2192499
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions subsys/testsuite/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ config TEST_USERSPACE
pass, CONFIG_ARCH_HAS_USERSPACE should be filtered in its
testcase.yaml.

config TEST_LOGGING_DEFAULTS
bool "Enable test case logging defaults"
depends on TEST
select LOG
select LOG_IMMEDIATE
default y
help
Option which implements default policy of enabling logging in
immediate mode for all test cases. For tests that need alternate
logging configuration, or no logging at all, disable this
in the project-level defconfig.

config TEST_ENABLE_USERSPACE
bool
depends on TEST_USERSPACE
Expand Down
1 change: 1 addition & 0 deletions tests/subsys/logging/log_core/prj.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CONFIG_MAIN_THREAD_PRIORITY=5
CONFIG_ZTEST=y
CONFIG_TEST_LOGGING_DEFAULTS=n
CONFIG_LOG=y
CONFIG_LOG_PRINTK=n
CONFIG_LOG_RUNTIME_FILTERING=y
Expand Down
1 change: 1 addition & 0 deletions tests/subsys/logging/log_list/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_MAIN_THREAD_PRIORITY=5
CONFIG_ZTEST=y
CONFIG_TEST_LOGGING_DEFAULTS=n
CONFIG_LOG=y
CONFIG_LOG_PRINTK=n
1 change: 1 addition & 0 deletions tests/subsys/logging/log_msg/prj.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CONFIG_MAIN_THREAD_PRIORITY=5
CONFIG_ZTEST=y
CONFIG_TEST_LOGGING_DEFAULTS=n
CONFIG_LOG=y
CONFIG_LOG_PRINTK=n
CONFIG_LOG_IMMEDIATE=n
1 change: 1 addition & 0 deletions tests/subsys/logging/log_output/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_MAIN_THREAD_PRIORITY=5
CONFIG_ZTEST=y
CONFIG_TEST_LOGGING_DEFAULTS=n
CONFIG_LOG=y
CONFIG_LOG_PRINTK=n

0 comments on commit 2192499

Please sign in to comment.