tests: Bluetooth: Mesh: use overlays for mesh bsim

Add the overlays usage for bsim mesh configurations instead of
multiple configurations that duplicate each other a lot.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
Aleksandr Khromykh 2023-01-20 10:53:43 +01:00 committed by Carles Cufí
parent 6b4b7a02e7
commit 83207d4a9a
20 changed files with 73 additions and 182 deletions

View file

@ -66,8 +66,15 @@ function RunTest(){
echo "Starting $testid as device #$idx"
conf=${conf:-prj_conf}
if [ ${overlay} ]; then
exe_name=./bs_${BOARD}_tests_bluetooth_bsim_bt_bsim_test_mesh_${conf}_${overlay}
else
exe_name=./bs_${BOARD}_tests_bluetooth_bsim_bt_bsim_test_mesh_${conf}
fi
Execute \
./bs_${BOARD}_tests_bluetooth_bsim_bt_bsim_test_mesh_${conf} \
${exe_name} \
-v=${verbosity_level} -s=$s_id -d=$idx -RealEncryption=1 \
-testid=$testid ${test_options}
let idx=idx+1

View file

@ -0,0 +1,7 @@
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_LOW_POWER=n
CONFIG_BT_MESH_FRIEND=n
CONFIG_BT_MESH_IV_UPDATE_TEST=n

View file

@ -0,0 +1,4 @@
CONFIG_BT_EXT_ADV=n
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_LOW_LAT=y
CONFIG_BT_TICKER_LOW_LAT=y

View file

@ -0,0 +1,17 @@
CONFIG_SETTINGS=y
CONFIG_SETTINGS_CUSTOM=y
CONFIG_BT_SETTINGS=y
CONFIG_BT_MESH_SETTINGS_LOG_LEVEL_DBG=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_MODEL_GROUP_COUNT=2
CONFIG_BT_MESH_CDB_NODE_COUNT=3
CONFIG_BT_MESH_CDB_SUBNET_COUNT=2
CONFIG_BT_MESH_SUBNET_COUNT=2
CONFIG_BT_MESH_TX_SEG_RETRANS_COUNT=1
CONFIG_BT_MESH_SEQ_STORE_RATE=1
CONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
CONFIG_BT_MESH_STORE_TIMEOUT=1

View file

@ -34,6 +34,7 @@ CONFIG_BT_MESH_FRIEND_ENABLED=n
CONFIG_BT_MESH_FRIEND_LPN_COUNT=5
CONFIG_BT_MESH_APP_KEY_COUNT=2
CONFIG_BT_MESH_MODEL_KEY_COUNT=2
CONFIG_BT_MESH_LABEL_COUNT=2
CONFIG_BT_MESH_IV_UPDATE_TEST=y
CONFIG_BT_MESH_PB_ADV=y
CONFIG_BT_MESH_PROVISIONER=y

View file

@ -1,44 +0,0 @@
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_ASSERT=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_PRIVACY=n
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh test"
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_PERIPHERAL=y
# Disable unused Bluetooth features
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_PRIVACY=n
# Bluetooth mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_ADV_BUF_COUNT=32
CONFIG_BT_MESH_TX_SEG_MAX=32
CONFIG_BT_MESH_RX_SEG_MAX=32
CONFIG_BT_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_CFG_CLI=y
CONFIG_BT_MESH_MODEL_GROUP_COUNT=3
CONFIG_BT_MESH_APP_KEY_COUNT=2
CONFIG_BT_MESH_MODEL_KEY_COUNT=2
CONFIG_BT_MESH_PB_ADV=y
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_PROVISIONER=y
CONFIG_BT_MESH_PROV_DEVICE=y
CONFIG_BT_MESH_CDB=y
CONFIG_BT_MESH_CDB_NODE_COUNT=4
CONFIG_BT_MESH_PROV_OOB_PUBLIC_KEY=y
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
CONFIG_BT_MESH_SUBNET_COUNT=5
CONFIG_BT_MESH_LOG_LEVEL_DBG=y

View file

@ -1,51 +0,0 @@
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_PRIVACY=n
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh test"
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_EXT_ADV=n
# Disable unused Bluetooth features
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_PRIVACY=n
# Controller Low Latency Variant
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_LOW_LAT=y
CONFIG_BT_TICKER_LOW_LAT=y
# Bluetooth mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_ADV_BUF_COUNT=32
CONFIG_BT_MESH_TX_SEG_MAX=32
CONFIG_BT_MESH_RX_SEG_MAX=32
CONFIG_BT_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_CFG_CLI=y
CONFIG_BT_MESH_MODEL_GROUP_COUNT=3
CONFIG_BT_MESH_LOW_POWER=y
CONFIG_BT_MESH_LPN_AUTO=n
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_FRIEND_ENABLED=n
CONFIG_BT_MESH_FRIEND_LPN_COUNT=5
CONFIG_BT_MESH_APP_KEY_COUNT=2
CONFIG_BT_MESH_MODEL_KEY_COUNT=2
CONFIG_BT_MESH_IV_UPDATE_TEST=y
CONFIG_BT_MESH_PB_ADV=y
CONFIG_BT_MESH_PROVISIONER=y
CONFIG_BT_MESH_PROV_DEVICE=y
CONFIG_BT_MESH_CDB=y
CONFIG_BT_MESH_CDB_NODE_COUNT=3
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
CONFIG_BT_MESH_LOG_LEVEL_DBG=y

View file

@ -1,59 +0,0 @@
CONFIG_SETTINGS=y
CONFIG_SETTINGS_CUSTOM=y
CONFIG_BT_MESH_SETTINGS_LOG_LEVEL_DBG=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_SETTINGS=y
CONFIG_BT_PRIVACY=n
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh test"
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_TINYCRYPT_ECC=y
# Disable unused Bluetooth features
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_PRIVACY=n
# Bluetooth mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_ADV_BUF_COUNT=32
CONFIG_BT_MESH_TX_SEG_MAX=32
CONFIG_BT_MESH_RX_SEG_MAX=32
CONFIG_BT_MESH_TX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_RX_SEG_MSG_COUNT=10
CONFIG_BT_MESH_CFG_CLI=y
CONFIG_BT_MESH_MODEL_GROUP_COUNT=3
CONFIG_BT_MESH_LOW_POWER=y
CONFIG_BT_MESH_LPN_AUTO=n
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_FRIEND_ENABLED=n
CONFIG_BT_MESH_FRIEND_LPN_COUNT=5
CONFIG_BT_MESH_APP_KEY_COUNT=2
CONFIG_BT_MESH_MODEL_KEY_COUNT=2
CONFIG_BT_MESH_MODEL_GROUP_COUNT=2
CONFIG_BT_MESH_LABEL_COUNT=2
CONFIG_BT_MESH_IV_UPDATE_TEST=y
CONFIG_BT_MESH_PB_ADV=y
CONFIG_BT_MESH_PROVISIONER=y
CONFIG_BT_MESH_PROV_DEVICE=y
CONFIG_BT_MESH_CDB=y
CONFIG_BT_MESH_CDB_NODE_COUNT=3
CONFIG_BT_MESH_CDB_SUBNET_COUNT=2
CONFIG_BT_MESH_SUBNET_COUNT=2
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_TX_SEG_RETRANS_COUNT=1
CONFIG_BT_MESH_SEQ_STORE_RATE=1
CONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
CONFIG_BT_MESH_STORE_TIMEOUT=1
CONFIG_BT_MESH_LOG_LEVEL_DBG=y

View file

@ -18,5 +18,5 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# Submit the advertiser buffer using bt_mesh_adv_send().
# With the separate scanner, observe that the submitted buffer is transmitted
# at least 6 times. Then, observe GATT Proxy beacons resuming.
conf=prj_gatt_conf
overlay=overlay_gatt_conf
RunTest mesh_adv_proxy_mixin adv_tx_proxy_mixin adv_rx_proxy_mixin

View file

@ -5,7 +5,7 @@
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# Test communication between the LPN and a third mesh device
conf=prj_low_lat_conf
overlay=overlay_low_lat_conf
RunTest mesh_friendship_msg_mesh_low_lat \
friendship_lpn_msg_mesh \
friendship_other_msg \

View file

@ -8,25 +8,25 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# Tests must be added in pairs and in sequence.
# First test: saves data; second test: verifies it.
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_data_save
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_data_load --\
-argstest access-cfg=configured
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_sub_overwrite --\
-argstest access-cfg=configured
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_data_load --\
-argstest access-cfg=new-subs
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_data_remove --\
-argstest access-cfg=new-subs
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_access_data_check persistence_access_data_load --\
-argstest access-cfg=not-configured

View file

@ -8,14 +8,14 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# Tests must be added in pairs and in sequence.
# First test: saves data; second test: verifies it.
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_cfg_check persistence_cfg_save -- -argstest stack-cfg=0
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_cfg_check persistence_cfg_load -- -argstest stack-cfg=0
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_cfg_check persistence_cfg_save -- -argstest stack-cfg=1
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_cfg_check persistence_cfg_load -- -argstest stack-cfg=1

View file

@ -9,11 +9,11 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# First test: saves data; second test: verifies it.
# SKIP=(persistence_provisioning_data_save)
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_provisioning_data_check persistence_provisioning_data_save
# SKIP=(persistence_provisioning_data_load)
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_provisioning_data_check persistence_provisioning_data_load

View file

@ -9,11 +9,11 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# First test: saves data; second test: verifies it.
# Provision, configure and reset a device
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_reprovisioning persistence_reprovisioning_device \
persistence_reprovisioning_provisioner -- -argstest clear-settings=1
# Repeat the test
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_persistence_reprovisioning persistence_reprovisioning_device \
persistence_reprovisioning_provisioner

View file

@ -4,12 +4,12 @@
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_replay_attack \
rpc_tx_immediate_replay_attack \
rpc_rx_immediate_replay_attack
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_replay_attack \
rpc_tx_power_replay_attack \
rpc_rx_power_replay_attack

View file

@ -11,9 +11,9 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
# The RPL entry odd address should stay unchanged;
# 4. Complete IVI Update;
# 5. Repeate steps 2 - 4 to remove RPL entry with odd address from RPL and cause fragmentation;
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_replay_fragmentation rpc_rx_rpl_frag rpc_tx_rpl_frag
# Simulate reboot and test that RPL entries are restored correctly after defragmentation
conf=prj_pst_conf
overlay=overlay_pst_conf
RunTest mesh_replay_fragmentation rpc_rx_reboot_after_defrag

View file

@ -4,5 +4,5 @@
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
conf=prj_low_lat_conf
overlay=overlay_low_lat_conf
RunTest mesh_transport_loopback_group_low_lat transport_tx_loopback_group transport_rx_group

View file

@ -4,5 +4,5 @@
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
conf=prj_low_lat_conf
overlay=overlay_low_lat_conf
RunTest mesh_transport_unicast_low_lat transport_tx_unicast transport_rx_unicast

View file

@ -62,9 +62,9 @@ app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
conf_file=prj_llcp.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_low_lat.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_pst.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_gatt.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_overlay=overlay_low_lat.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_overlay=overlay_pst.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_overlay=overlay_gatt.conf compile &
app=tests/bluetooth/bsim_bt/bsim_test_disable compile &
wait

View file

@ -13,13 +13,22 @@ function compile(){
local ninja_args="${ninja_args:-""}"
local cc_flags="${cc_flags:-"-Werror"}"
local exe_name="${exe_name:-bs_${BOARD}_${app}_${conf_file}}"
if [ "${conf_overlay}" ]; then
local exe_name="${exe_name:-bs_${BOARD}_${app}_${conf_file}_${conf_overlay}}"
else
local exe_name="${exe_name:-bs_${BOARD}_${app}_${conf_file}}"
fi
local exe_name=${exe_name//\//_}
local exe_name=${exe_name//./_}
local exe_name=${BSIM_OUT_PATH}/bin/$exe_name
local map_file_name=${exe_name}.Tsymbols
local this_dir=${WORK_DIR}/${app}/${conf_file}
if [ "${conf_overlay}" ]; then
local this_dir=${WORK_DIR}/${app}/${conf_file}_${conf_overlay}
else
local this_dir=${WORK_DIR}/${app}/${conf_file}
fi
local modules_arg="${ZEPHYR_MODULES:+-DZEPHYR_MODULES=${ZEPHYR_MODULES}}"