Implementation to take command-line arguments to set log level in run time for bsim module. Set default log level if no log level is passed at runtime Signed-off-by: Guru Mehar Rachaputi <gurumeharrachaputi@gmail.com>
57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
# Select only the config options that are necessary for the test.
|
|
# I.e. don't just copy this config and its comments into your new test.
|
|
#
|
|
# If the test is a stress or robustness test, it is also a good idea to set the
|
|
# stack resources (e.g. number of buffers, roles) to the lowest value possible.
|
|
|
|
CONFIG_BT=y
|
|
CONFIG_BT_DEVICE_NAME="sample-test"
|
|
CONFIG_BT_PERIPHERAL=y
|
|
CONFIG_BT_CENTRAL=y
|
|
|
|
# Dependency of testlib/adv and testlib/scan.
|
|
CONFIG_BT_EXT_ADV=y
|
|
|
|
CONFIG_BT_GATT_CLIENT=y
|
|
CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y
|
|
|
|
# This is the object of the test. Commenting it out should make the test fail.
|
|
CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n
|
|
|
|
# Always enable asserts in tests, they're virtually free on native targets.
|
|
CONFIG_ASSERT=y
|
|
|
|
# The same applies for logs.
|
|
# Only enable the INFO level though, as a contributor that isn't familiar with
|
|
# the test will have a hard time understanding what the problem is if it's
|
|
# buried in thousands of lines of debug logs.
|
|
CONFIG_LOG=y
|
|
CONFIG_LOG_RUNTIME_FILTERING=y
|
|
|
|
# Those two options together add the thread name in every log print, very useful
|
|
# for debugging if you expect the same functions to be called from different
|
|
# threads.
|
|
CONFIG_THREAD_NAME=y
|
|
CONFIG_LOG_THREAD_ID_PREFIX=y
|
|
|
|
# BT_TESTING provides additional hooks in the stack to inspect or modify state.
|
|
# It is not strictly necessary, leave it disabled if you don't need it.
|
|
# CONFIG_BT_TESTING=y
|
|
|
|
# Will call `raise(SIGTRAP)` on fatal error.
|
|
# If a debugger is connected to the app, it will automatically be stopped.
|
|
# Makes retrieving an exception stacktrace very easy.
|
|
CONFIG_ARCH_POSIX_TRAP_ON_FATAL=y
|
|
|
|
# It's OK to leave useful debug options commented out, with a short comment
|
|
# explaining why they might be useful. That way, someone trying to debug your
|
|
# test will get a headstart.
|
|
# CONFIG_BT_CONN_LOG_LEVEL_DBG=y
|
|
# CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
|
# CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
|
|
|
# For this particular test, the LOG_INF printed on `bt_enable()` are just noise.
|
|
# They might matter for other tests though. They are printed by the
|
|
# "bt_hci_core" domain, and HCI_CORE doesn't use LOG_INF very much anyways.
|
|
CONFIG_BT_HCI_CORE_LOG_LEVEL_WRN=y
|