diff --git a/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh b/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh index dcb20010a1bd422..bf049c331b2c62a 100755 --- a/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh +++ b/tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh @@ -13,5 +13,6 @@ export BOARD="${BOARD:-nrf5340bsim/nrf5340/cpunet}" source ${ZEPHYR_BASE}/tests/bsim/sh_common.source ${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/compile.sh wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/chain/testcase.yaml b/tests/bsim/bluetooth/host/adv/chain/testcase.yaml new file mode 100644 index 000000000000000..7d57ab466f31053 --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/chain/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.adv.chain: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_chain_prj_conf diff --git a/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh b/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh index 045b1eba6490337..71bdcc16212b53a 100755 --- a/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh +++ b/tests/bsim/bluetooth/host/adv/chain/tests_scripts/adv_chain.sh @@ -11,6 +11,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_chain_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=adv diff --git a/tests/bsim/bluetooth/host/adv/compile.sh b/tests/bsim/bluetooth/host/adv/compile.sh deleted file mode 100755 index 845f86db003e6b8..000000000000000 --- a/tests/bsim/bluetooth/host/adv/compile.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app=tests/bsim/bluetooth/host/adv/chain compile -app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_advertiser.conf compile -app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_scanner.conf compile -app=tests/bsim/bluetooth/host/adv/periodic compile -app=tests/bsim/bluetooth/host/adv/periodic conf_file=prj_long_data.conf compile -app=tests/bsim/bluetooth/host/adv/periodic conf_file=prj_coded.conf compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh -app=tests/bsim/bluetooth/host/adv/encrypted/ead_sample compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/long_ad/compile.sh - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh deleted file mode 100755 index de926e8b267b136..000000000000000 --- a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh index 0ac5936aaa3098d..9f8930231d4f756 100755 --- a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh +++ b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/test_scripts/run_tests.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="$(guess_test_long_name)" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml new file mode 100644 index 000000000000000..0714a94456ddf67 --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.adv.encrypted.css_sample_data: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_encrypted_css_sample_data_prj_conf diff --git a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh index adbe2b19b781de8..afe8f4518efd83b 100755 --- a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh +++ b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/test_scripts/ead_sample.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_encrypted_ead_sample_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml new file mode 100644 index 000000000000000..5cba71405929407 --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.adv.encrypted.ead_sample: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_encrypted_ead_sample_prj_conf diff --git a/tests/bsim/bluetooth/host/adv/extended/testcase.yaml b/tests/bsim/bluetooth/host/adv/extended/testcase.yaml new file mode 100644 index 000000000000000..22ad42304b29d4b --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/extended/testcase.yaml @@ -0,0 +1,20 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + +tests: + bluetooth.host.adv.extended.advertiser: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf + extra_args: + CONF_FILE=prj_advertiser.conf + bluetooth.host.adv.extended.scanner: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_extended_prj_scanner_conf + extra_args: + CONF_FILE=prj_scanner.conf diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh index d164626e4205fa9..320d59607f1196e 100755 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh +++ b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv.sh @@ -14,6 +14,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=ext_adv_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh index 50a56853be6b4eb..360647dbdfdc304 100755 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh +++ b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn.sh @@ -16,6 +16,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=ext_adv_conn_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh index c5f3b3d10c2cf41..c7e1bd35963ba82 100755 --- a/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh +++ b/tests/bsim/bluetooth/host/adv/extended/tests_scripts/ext_adv_conn_x5.sh @@ -16,6 +16,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_extended_prj_advertiser_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=ext_adv_conn_advertiser_x5 -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/long_ad/compile.sh b/tests/bsim/bluetooth/host/adv/long_ad/compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/adv/long_ad/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh b/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh index ad78f49e54e1e45..cb55fb89581b597 100755 --- a/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/adv/long_ad/test_scripts/run.sh @@ -14,6 +14,10 @@ verbosity_level=2 SIM_LEN_US=$((2 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml b/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml new file mode 100644 index 000000000000000..4983590e2df01ff --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/long_ad/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.adv.long_ad: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_long_ad_prj_conf diff --git a/tests/bsim/bluetooth/host/adv/periodic/prj_coded.conf b/tests/bsim/bluetooth/host/adv/periodic/prj_coded.conf index 50c4c33e08a1236..6cc98bca244c01f 100644 --- a/tests/bsim/bluetooth/host/adv/periodic/prj_coded.conf +++ b/tests/bsim/bluetooth/host/adv/periodic/prj_coded.conf @@ -1,15 +1 @@ -CONFIG_BT=y -CONFIG_BT_DEVICE_NAME="test_per_adv" -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_SMP=y -CONFIG_BT_PRIVACY=y - -CONFIG_BT_EXT_ADV=y -CONFIG_BT_EXT_ADV_MAX_ADV_SET=2 -CONFIG_BT_CTLR_ADVANCED_FEATURES=y -CONFIG_BT_CTLR_ADV_AUX_SET=2 -CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=2 CONFIG_BT_CTLR_PHY_CODED=y -CONFIG_BT_PER_ADV=y -CONFIG_BT_PER_ADV_SYNC=y diff --git a/tests/bsim/bluetooth/host/adv/periodic/prj_long_data.conf b/tests/bsim/bluetooth/host/adv/periodic/prj_long_data.conf index 44898952657e6fc..063e36fbeb7708d 100644 --- a/tests/bsim/bluetooth/host/adv/periodic/prj_long_data.conf +++ b/tests/bsim/bluetooth/host/adv/periodic/prj_long_data.conf @@ -1,21 +1,8 @@ -CONFIG_BT=y -CONFIG_BT_DEVICE_NAME="test_per_adv" -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_SMP=y -CONFIG_BT_PRIVACY=y - -CONFIG_BT_EXT_ADV=y -CONFIG_BT_EXT_ADV_MAX_ADV_SET=2 -CONFIG_BT_CTLR_ADVANCED_FEATURES=y -CONFIG_BT_CTLR_ADV_AUX_SET=2 CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=2 CONFIG_BT_CTLR_ADV_AUX_PDU_BACK2BACK=y CONFIG_BT_CTLR_ADV_SYNC_PDU_BACK2BACK=y -CONFIG_BT_PER_ADV=y -CONFIG_BT_PER_ADV_SYNC=y -CONFIG_BT_PER_ADV_SYNC_BUF_SIZE=1650 +CONFIG_BT_PER_ADV_SYNC_BUF_SIZE=1650 CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=1650 CONFIG_BT_CTLR_ADV_DATA_CHAIN=y CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=1650 diff --git a/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml b/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml new file mode 100644 index 000000000000000..8193cab8c7c4d28 --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/periodic/testcase.yaml @@ -0,0 +1,23 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + +tests: + bluetooth.host.adv.periodic: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_conf + bluetooth.host.adv.periodic.coded: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf + extra_args: + EXTRA_CONF_FILE=prj_coded.conf + bluetooth.host.adv.periodic.long_data: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf + extra_args: + EXTRA_CONF_FILE=prj_long_data.conf diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh index a7b8d99b6548902..0f01b1cb55d37f6 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv.sh @@ -12,6 +12,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh index 7176929cb2d0b65..4fee8b3fde6d4f3 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning.sh @@ -12,6 +12,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh index 31fd0195dddf702..35c68b2bc595486 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_app_not_scanning_coded.sh @@ -13,6 +13,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_coded_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_advertiser_coded_phy -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh index a459c91e450aca2..9ead377da109324 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn.sh @@ -12,6 +12,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_conn_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh index 1fe7b38d61ca794..b9ce15a2cfaf702 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_conn_privacy.sh @@ -12,6 +12,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_conn_privacy_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh index b660ba2598fb6d9..6b8caa2c32bb4ed 100755 --- a/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh +++ b/tests/bsim/bluetooth/host/adv/periodic/tests_scripts/per_adv_long_data.sh @@ -12,6 +12,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_adv_periodic_prj_long_data_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \ -testid=per_adv_long_data_advertiser -rs=23 diff --git a/tests/bsim/bluetooth/host/att/compile.sh b/tests/bsim/bluetooth/host/att/compile.sh deleted file mode 100755 index e6e25cf9c295a27..000000000000000 --- a/tests/bsim/bluetooth/host/att/compile.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_lowres.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_collision.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_multiple_conn.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_autoconnect.conf compile -app=tests/bsim/bluetooth/host/att/eatt_notif conf_file=prj.conf compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/mtu_update/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/read_fill_buf/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/retry_on_sec_err/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/sequential/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/pipeline/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/long_read/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/open_close/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/timeout/compile.sh - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/eatt/prj_collision.conf b/tests/bsim/bluetooth/host/att/eatt/prj.conf similarity index 100% rename from tests/bsim/bluetooth/host/att/eatt/prj_collision.conf rename to tests/bsim/bluetooth/host/att/eatt/prj.conf index 0b27819bba7427e..fc746b53126b272 100644 --- a/tests/bsim/bluetooth/host/att/eatt/prj_collision.conf +++ b/tests/bsim/bluetooth/host/att/eatt/prj.conf @@ -1,3 +1,7 @@ +CONFIG_BT_TESTING=y +CONFIG_LOG=y +CONFIG_ASSERT=y + CONFIG_BT=y CONFIG_BT_CENTRAL=y CONFIG_BT_PERIPHERAL=y @@ -9,7 +13,3 @@ CONFIG_BT_L2CAP_ECRED=y CONFIG_BT_EATT_MAX=5 CONFIG_BT_MAX_CONN=1 CONFIG_BT_EATT_AUTO_CONNECT=n - -CONFIG_BT_TESTING=y -CONFIG_LOG=y -CONFIG_ASSERT=y diff --git a/tests/bsim/bluetooth/host/att/eatt/prj_autoconnect.conf b/tests/bsim/bluetooth/host/att/eatt/prj_autoconnect.conf index a65c56908b43936..bd0a8e56dc0f7e4 100644 --- a/tests/bsim/bluetooth/host/att/eatt/prj_autoconnect.conf +++ b/tests/bsim/bluetooth/host/att/eatt/prj_autoconnect.conf @@ -1,17 +1,4 @@ -CONFIG_BT=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_SMP=y -CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y -CONFIG_BT_DEVICE_NAME="EATT test" -CONFIG_BT_EATT=y -CONFIG_BT_L2CAP_ECRED=y -CONFIG_BT_EATT_MAX=5 -CONFIG_BT_MAX_CONN=1 - -CONFIG_BT_TESTING=y -CONFIG_LOG=y -CONFIG_ASSERT=y +CONFIG_BT_EATT_AUTO_CONNECT=y CONFIG_BT_L2CAP_TX_MTU=200 CONFIG_BT_L2CAP_LOG_LEVEL_DBG=y diff --git a/tests/bsim/bluetooth/host/att/eatt/prj_lowres.conf b/tests/bsim/bluetooth/host/att/eatt/prj_lowres.conf index 936fdeaa420113a..46ccad682f723ab 100644 --- a/tests/bsim/bluetooth/host/att/eatt/prj_lowres.conf +++ b/tests/bsim/bluetooth/host/att/eatt/prj_lowres.conf @@ -1,17 +1,3 @@ -CONFIG_BT=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_SMP=y -CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y -CONFIG_BT_DEVICE_NAME="EATT test" -CONFIG_BT_EATT=y -CONFIG_BT_L2CAP_ECRED=y CONFIG_BT_EATT_MAX=2 -CONFIG_BT_MAX_CONN=1 -CONFIG_BT_EATT_AUTO_CONNECT=n - -CONFIG_BT_TESTING=y -CONFIG_LOG=y -CONFIG_ASSERT=y CONFIG_BT_L2CAP_LOG_LEVEL_DBG=y diff --git a/tests/bsim/bluetooth/host/att/eatt/prj_multiple_conn.conf b/tests/bsim/bluetooth/host/att/eatt/prj_multiple_conn.conf index b746172ba23e507..4f2fcc7c6a149a2 100644 --- a/tests/bsim/bluetooth/host/att/eatt/prj_multiple_conn.conf +++ b/tests/bsim/bluetooth/host/att/eatt/prj_multiple_conn.conf @@ -1,15 +1 @@ -CONFIG_BT=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_SMP=y -CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y -CONFIG_BT_DEVICE_NAME="EATT test" -CONFIG_BT_EATT=y -CONFIG_BT_L2CAP_ECRED=y -CONFIG_BT_EATT_MAX=5 CONFIG_BT_MAX_CONN=2 -CONFIG_BT_EATT_AUTO_CONNECT=n - -CONFIG_BT_TESTING=y -CONFIG_LOG=y -CONFIG_ASSERT=y diff --git a/tests/bsim/bluetooth/host/att/eatt/testcase.yaml b/tests/bsim/bluetooth/host/att/eatt/testcase.yaml new file mode 100644 index 000000000000000..3eb50cba381b688 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/eatt/testcase.yaml @@ -0,0 +1,27 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.att.eatt.autoconnect: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf + extra_args: + EXTRA_CONF_FILE=prj_autoconnect.conf + bluetooth.host.adt.eatt.collision: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_collision_conf + bluetooth.host.att.eatt.lowres: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_lowres_conf + extra_args: + EXTRA_CONF_FILE=prj_lowres.conf + bluetooth.host.att.eatt.multiple_conn: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_prj_multiple_conn_conf + extra_args: + EXTRA_CONF_FILE=prj_multiple_conn.conf diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh index 057e76f181313f3..9c51223884ad3ea 100755 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh +++ b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/autoconnect.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_autoconnect -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh index c89bab275481d27..e47745b897bc35b 100755 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh +++ b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/collision.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_collision_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh index 0d988761adfb20c..15313668fd25e6f 100755 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh +++ b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/lowres.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_lowres -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh index e3919eb4a26502f..12e7cbca8ee2259 100755 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh +++ b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/multiple_conn.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_multiple_conn_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh index d2a51f290986d40..d720f3155c80c43 100755 --- a/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh +++ b/tests/bsim/bluetooth/host/att/eatt/tests_scripts/reconfigure.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_prj_autoconnect_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_reconfigure -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh b/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh index 39000efbc742595..f932a5af732cde7 100755 --- a/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh +++ b/tests/bsim/bluetooth/host/att/eatt_notif/test_scripts/eatt_notif.sh @@ -12,6 +12,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_eatt_notif_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=client -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml b/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml new file mode 100644 index 000000000000000..dab2674321dd592 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/eatt_notif/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.att.eatt_notif: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_eatt_notif_prj_conf diff --git a/tests/bsim/bluetooth/host/att/long_read/CMakeLists.txt b/tests/bsim/bluetooth/host/att/long_read/CMakeLists.txt index 0f6727fd5a44b7f..53a62e84c4a6c02 100644 --- a/tests/bsim/bluetooth/host/att/long_read/CMakeLists.txt +++ b/tests/bsim/bluetooth/host/att/long_read/CMakeLists.txt @@ -8,9 +8,9 @@ project(app) add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/common/testlib testlib) target_sources(app PRIVATE - bs_main.c - bs_sync.c - main.c + src/bs_main.c + src/bs_sync.c + src/main.c ) zephyr_include_directories( diff --git a/tests/bsim/bluetooth/host/att/long_read/compile.sh b/tests/bsim/bluetooth/host/att/long_read/compile.sh deleted file mode 100755 index 718910a63c44d2b..000000000000000 --- a/tests/bsim/bluetooth/host/att/long_read/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/long_read/bs_macro.h b/tests/bsim/bluetooth/host/att/long_read/src/bs_macro.h similarity index 100% rename from tests/bsim/bluetooth/host/att/long_read/bs_macro.h rename to tests/bsim/bluetooth/host/att/long_read/src/bs_macro.h diff --git a/tests/bsim/bluetooth/host/att/long_read/bs_main.c b/tests/bsim/bluetooth/host/att/long_read/src/bs_main.c similarity index 100% rename from tests/bsim/bluetooth/host/att/long_read/bs_main.c rename to tests/bsim/bluetooth/host/att/long_read/src/bs_main.c diff --git a/tests/bsim/bluetooth/host/att/long_read/bs_sync.c b/tests/bsim/bluetooth/host/att/long_read/src/bs_sync.c similarity index 100% rename from tests/bsim/bluetooth/host/att/long_read/bs_sync.c rename to tests/bsim/bluetooth/host/att/long_read/src/bs_sync.c diff --git a/tests/bsim/bluetooth/host/att/long_read/bs_sync.h b/tests/bsim/bluetooth/host/att/long_read/src/bs_sync.h similarity index 100% rename from tests/bsim/bluetooth/host/att/long_read/bs_sync.h rename to tests/bsim/bluetooth/host/att/long_read/src/bs_sync.h diff --git a/tests/bsim/bluetooth/host/att/long_read/main.c b/tests/bsim/bluetooth/host/att/long_read/src/main.c similarity index 100% rename from tests/bsim/bluetooth/host/att/long_read/main.c rename to tests/bsim/bluetooth/host/att/long_read/src/main.c diff --git a/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh index 148865c54745c4d..4ef06ee240ea006 100755 --- a/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/att/long_read/test_scripts/run.sh @@ -7,6 +7,10 @@ set -eu source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="long_read" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dev_exe=bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf args_all=(-s=${simulation_id} -D=2) args_dev=(-v=2 -RealEncryption=1 -testid=the_test) diff --git a/tests/bsim/bluetooth/host/att/long_read/testcase.yaml b/tests/bsim/bluetooth/host/att/long_read/testcase.yaml new file mode 100644 index 000000000000000..99f64062b234447 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/long_read/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.long_read: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_long_read_prj_conf diff --git a/tests/bsim/bluetooth/host/att/mtu_update/compile.sh b/tests/bsim/bluetooth/host/att/mtu_update/compile.sh deleted file mode 100755 index 6c611c5900b01f0..000000000000000 --- a/tests/bsim/bluetooth/host/att/mtu_update/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" conf_file=prj_central.conf compile -app="$(guess_test_relpath)" conf_file=prj_peripheral.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh index f2947d62b12491a..514ab1dc5865f06 100755 --- a/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/att/mtu_update/test_scripts/run_test.sh @@ -10,13 +10,17 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_mtu_update_prj_central_conf" -peripheral_exe="./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf" +periph_exe="./bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf" Execute "$central_exe" \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1 -Execute "$peripheral_exe" \ +Execute "$periph_exe" \ -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral -RealEncryption=1 Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ diff --git a/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml b/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml new file mode 100644 index 000000000000000..4f933fc3dfd3a24 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/mtu_update/testcase.yaml @@ -0,0 +1,19 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.att.mtu_update.central: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_mtu_update_prj_central_conf + extra_args: + CONF_FILE=prj_central.conf + bluetooth.host.att.mtu_update.peripheral: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_mtu_update_prj_peripheral_conf + extra_args: + CONF_FILE=prj_peripheral.conf diff --git a/tests/bsim/bluetooth/host/att/open_close/compile.sh b/tests/bsim/bluetooth/host/att/open_close/compile.sh deleted file mode 100755 index de926e8b267b136..000000000000000 --- a/tests/bsim/bluetooth/host/att/open_close/compile.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu - -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh index c18d5e0a9a512e5..ee14a2bb5f1e132 100755 --- a/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/att/open_close/test_scripts/run.sh @@ -7,6 +7,10 @@ set -eu source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_path=$(guess_test_long_name) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dev_exe="bs_${BOARD_TS}_${test_path}_prj_conf" simulation_id="${test_path}" diff --git a/tests/bsim/bluetooth/host/att/open_close/testcase.yaml b/tests/bsim/bluetooth/host/att/open_close/testcase.yaml new file mode 100644 index 000000000000000..5373fb46bfcfa96 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/open_close/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.open_close: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_open_close_prj_conf diff --git a/tests/bsim/bluetooth/host/att/pipeline/compile.sh b/tests/bsim/bluetooth/host/att/pipeline/compile.sh deleted file mode 100755 index 06d5d718a9dca9a..000000000000000 --- a/tests/bsim/bluetooth/host/att/pipeline/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/dut compile -app="$(guess_test_relpath)"/dut conf_file='prj.conf;rx_tx_prio_invert.extra.conf' compile -app="$(guess_test_relpath)"/tester compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml b/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml new file mode 100644 index 000000000000000..7e8df588f4dab80 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/pipeline/dut/testcase.yaml @@ -0,0 +1,18 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.att.pipeline.dut: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf + bluetooth.host.att.pipeline.dut_rx_tx_prio: + harness_config: + bsim_exe_name: + tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf_rx_tx_prio_invert_extra_conf + extra_args: + EXTRA_CONF_FILE=rx_tx_prio_invert.extra.conf diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh index dba6867a3aabb07..7ef2fb3ef32bce3 100755 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh index d271c9c04fad3e5..c34e85ce88923d7 100755 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh +++ b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_shall_not_pipeline_variant_rx_tx_prio_invert.sh @@ -28,6 +28,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" dut_exe+="_rx_tx_prio_invert_extra_conf" tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh index d5d90c645d34e4d..0981bec0a05dc65 100755 --- a/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh +++ b/tests/bsim/bluetooth/host/att/pipeline/test_scripts/run_test_tolerate_pipeline_variant_rx_tx_prio_invert.sh @@ -30,6 +30,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_dut_prj_conf" dut_exe+="_rx_tx_prio_invert_extra_conf" tester_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml b/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml new file mode 100644 index 000000000000000..0af7faf0d240361 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/pipeline/tester/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.pipeline.tester: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_pipeline_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml b/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml new file mode 100644 index 000000000000000..8a6abbd0b48bf2e --- /dev/null +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/client/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.read_fill_buf.client: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_read_fill_buf_client_prj_conf diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/compile.sh b/tests/bsim/bluetooth/host/att/read_fill_buf/compile.sh deleted file mode 100755 index 6c80f22923a2d0b..000000000000000 --- a/tests/bsim/bluetooth/host/att/read_fill_buf/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/client compile -app="$(guess_test_relpath)"/server compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml b/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml new file mode 100644 index 000000000000000..bb9220e6777ec72 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/server/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.read_fill_buf.server: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_read_fill_buf_server_prj_conf diff --git a/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh index 2c51d5ff3f5b4d7..feb4555ab298c79 100755 --- a/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh +++ b/tests/bsim/bluetooth/host/att/read_fill_buf/test_scripts/run_tests.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id="read_fill_buf" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe_d0="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" test_exe_d1="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml b/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml new file mode 100644 index 000000000000000..eed4af719451d65 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/client/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.retry_on_sec_err.client: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_retry_on_sec_err_client_prj_conf diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/compile.sh b/tests/bsim/bluetooth/host/att/retry_on_sec_err/compile.sh deleted file mode 100755 index 6c80f22923a2d0b..000000000000000 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/client compile -app="$(guess_test_relpath)"/server compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml b/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml new file mode 100644 index 000000000000000..6617256b62b36cd --- /dev/null +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/server/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.retry_on_sec_err.server: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_retry_on_sec_err_server_prj_conf diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh index da52822211fc713..16063747584de51 100755 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="retry_on_sec_err" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe_d0="./bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" test_exe_d1="./bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh index 15c973a8cd191e1..fb7986a22dc4853 100755 --- a/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh +++ b/tests/bsim/bluetooth/host/att/retry_on_sec_err/test_scripts/run_test_security_request.sh @@ -7,6 +7,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="retry_on_sec_err_seq_request" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe_d0="./bs_${BOARD_TS}_$(guess_test_long_name)_client_prj_conf" test_exe_d1="./bs_${BOARD_TS}_$(guess_test_long_name)_server_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/sequential/compile.sh b/tests/bsim/bluetooth/host/att/sequential/compile.sh deleted file mode 100755 index ff0f485b17d58b0..000000000000000 --- a/tests/bsim/bluetooth/host/att/sequential/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/dut compile -app="$(guess_test_relpath)"/tester compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml b/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml new file mode 100644 index 000000000000000..33b24b58e74488f --- /dev/null +++ b/tests/bsim/bluetooth/host/att/sequential/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.sequential.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_sequential_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh b/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh index b67a1fa379d03df..c80891c5f5b1286 100755 --- a/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh +++ b/tests/bsim/bluetooth/host/att/sequential/test_scripts/sequential.sh @@ -7,6 +7,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="att_sequential" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml b/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml new file mode 100644 index 000000000000000..122c70d6f16f8be --- /dev/null +++ b/tests/bsim/bluetooth/host/att/sequential/tester/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.sequential.tester: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_sequential_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/att/timeout/CMakeLists.txt b/tests/bsim/bluetooth/host/att/timeout/CMakeLists.txt index 66b7d8796c3e8b4..d2bf49c8d0996ee 100644 --- a/tests/bsim/bluetooth/host/att/timeout/CMakeLists.txt +++ b/tests/bsim/bluetooth/host/att/timeout/CMakeLists.txt @@ -8,15 +8,15 @@ project(app) add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/common/testlib testlib) target_sources(app PRIVATE - ../long_read/bs_main.c - ../long_read/bs_sync.c + ../long_read/src/bs_main.c + ../long_read/src/bs_sync.c main.c ) zephyr_include_directories( ${BSIM_COMPONENTS_PATH}/libPhyComv1/src/ ${BSIM_COMPONENTS_PATH}/libUtilv1/src/ - ../long_read/ + ../long_read/src ) target_link_libraries(app PRIVATE diff --git a/tests/bsim/bluetooth/host/att/timeout/compile.sh b/tests/bsim/bluetooth/host/att/timeout/compile.sh deleted file mode 100755 index b7b1eea135e73d4..000000000000000 --- a/tests/bsim/bluetooth/host/att/timeout/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh b/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh index 1a28986ba6b1d82..8047f981d191ff4 100755 --- a/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/att/timeout/test_scripts/run.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source EXECUTE_TIMEOUT=120 simulation_id="timeout" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dev_exe=bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf args_all=(-s=${simulation_id} -D=2) args_dev=(-v=2 -RealEncryption=1 -testid=the_test) diff --git a/tests/bsim/bluetooth/host/att/timeout/testcase.yaml b/tests/bsim/bluetooth/host/att/timeout/testcase.yaml new file mode 100644 index 000000000000000..5086e47547e05b8 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/timeout/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.att.timeout: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_att_timeout_prj_conf diff --git a/tests/bsim/bluetooth/host/central/testcase.yaml b/tests/bsim/bluetooth/host/central/testcase.yaml new file mode 100644 index 000000000000000..468ac2c61f9d079 --- /dev/null +++ b/tests/bsim/bluetooth/host/central/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.central: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_central_prj_conf diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/central/tests_scripts/_compile.sh deleted file mode 100755 index f46c09eab660412..000000000000000 --- a/tests/bsim/bluetooth/host/central/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh index 3b0cdcab24e0dbf..de17b29485c55f3 100755 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh +++ b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_timeout.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_timeout diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh index af64f6a14ad10d9..111edb56e1090cb 100755 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh +++ b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_to_existing.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_to_existing diff --git a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh index 5d352adc0fe167f..3744ea655789151 100755 --- a/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh +++ b/tests/bsim/bluetooth/host/central/tests_scripts/run_central_connect_when_connecting.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_central_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_connect_when_connecting diff --git a/tests/bsim/bluetooth/host/compile.sh b/tests/bsim/bluetooth/host/compile.sh index 34a59bf8378787b..36cf400f6568922 100755 --- a/tests/bsim/bluetooth/host/compile.sh +++ b/tests/bsim/bluetooth/host/compile.sh @@ -9,37 +9,7 @@ set -ue : "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" -source ${ZEPHYR_BASE}/tests/bsim/compile.source +#Set a default value to BOARD if it does not have one yet +BOARD="${BOARD:-nrf52_bsim}" -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/compile.sh -app=tests/bsim/bluetooth/host/central compile -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/compile.sh -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/compile.sh -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/compile.sh -${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/compile.sh - -app=tests/bsim/bluetooth/host/iso/cis compile -app=tests/bsim/bluetooth/host/iso/bis compile -app=tests/bsim/bluetooth/host/iso/frag compile -app=tests/bsim/bluetooth/host/iso/frag_2 compile - -app=tests/bsim/bluetooth/host/misc/disable compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/disconnect/compile.sh -app=tests/bsim/bluetooth/host/misc/conn_stress/central compile -app=tests/bsim/bluetooth/host/misc/conn_stress/peripheral compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/hfc/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/hfc_multilink/compile.sh -app=tests/bsim/bluetooth/host/misc/unregister_conn_cb compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/sample_test/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/acl_tx_frag/compile.sh - -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/central/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/peripheral/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/device/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/legacy/compile.sh - -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/id/settings/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/scan/start_stop/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/scan/slow/compile.sh - -wait_for_background_jobs +west twister -T ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/ -p ${BOARD} diff --git a/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh b/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh index 359247e08d982d3..018978cec95319c 100755 --- a/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh +++ b/tests/bsim/bluetooth/host/gatt/authorization/test_scripts/gatt.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_authorization_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client diff --git a/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml b/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml new file mode 100644 index 000000000000000..670e75a2d501e84 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/authorization/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.gatt.authorization: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_authorization_prj_conf diff --git a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh index 5ba9e92e66f1868..5310db44d49676d 100755 --- a/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh +++ b/tests/bsim/bluetooth/host/gatt/caching/test_scripts/_run_test.sh @@ -10,6 +10,10 @@ BIN_SUFFIX=${bin_suffix:-} cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_caching_prj_conf${BIN_SUFFIX} \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml b/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml new file mode 100644 index 000000000000000..96bfff9c7099675 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/caching/testcase.yaml @@ -0,0 +1,18 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + +tests: + bluetooth.host.gatt.caching: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf + bluetooth.host.gatt.caching_psa_overlay: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_caching_prj_conf_psa_overlay_conf + extra_args: + EXTRA_CONF_FILE=psa_overlay.conf diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/compile.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/compile.sh deleted file mode 100755 index cb72bfca81cb220..000000000000000 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_2.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh index e09177ef122ee18..cd1bacdd75501f3 100755 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh +++ b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" simulation_id="ccc_store" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_2.sh b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_2.sh index 29befb8660265f2..5ba61502302d094 100755 --- a/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_2.sh +++ b/tests/bsim/bluetooth/host/gatt/ccc_store/test_scripts/ccc_store_2.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_$(guess_test_long_name)_prj_2_conf" simulation_id="ccc_store_2" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml b/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml new file mode 100644 index 000000000000000..3d0f1c8d82695e8 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/ccc_store/testcase.yaml @@ -0,0 +1,17 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.gatt.ccc_store: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_ccc_store_prj_conf + bluetooth.host.gatt.ccc_store_2: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_ccc_store_prj_2_conf + extra_args: + EXTRA_CONF_FILE=prj_2.conf diff --git a/tests/bsim/bluetooth/host/gatt/compile.sh b/tests/bsim/bluetooth/host/gatt/compile.sh deleted file mode 100755 index d26e4007e69a8ed..000000000000000 --- a/tests/bsim/bluetooth/host/gatt/compile.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app=tests/bsim/bluetooth/host/gatt/authorization compile -app=tests/bsim/bluetooth/host/gatt/caching compile -app=tests/bsim/bluetooth/host/gatt/caching conf_overlay=psa_overlay.conf compile -app=tests/bsim/bluetooth/host/gatt/general compile -app=tests/bsim/bluetooth/host/gatt/notify compile -app=tests/bsim/bluetooth/host/gatt/notify_multiple compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/settings/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/ccc_store/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/sc_indicate/compile.sh - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh b/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh index df41707e832a13e..c07cecfc4ee35ea 100755 --- a/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh +++ b/tests/bsim/bluetooth/host/gatt/general/test_scripts/gatt.sh @@ -14,6 +14,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_general_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/general/testcase.yaml b/tests/bsim/bluetooth/host/gatt/general/testcase.yaml new file mode 100644 index 000000000000000..73da6bc222a5de0 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/general/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.gatt.general: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_general_prj_conf diff --git a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh index faa4199dd04c6ff..a6a8933053ac3ff 100755 --- a/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh +++ b/tests/bsim/bluetooth/host/gatt/notify/test_scripts/_run_test.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=${client_id} -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml b/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml new file mode 100644 index 000000000000000..6981ee4f3e8d9f2 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/notify/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.gatt.notify: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_prj_conf diff --git a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/_notify-debug.sh b/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/_notify-debug.sh index b104a3d666a9b86..5acd121eaa66e84 100755 --- a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/_notify-debug.sh +++ b/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/_notify-debug.sh @@ -26,6 +26,10 @@ if [[ $2 == "debug" ]]; then fi if [[ $1 == "client" ]]; then +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + $GDB_P ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client diff --git a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh b/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh index d89a5701fd9988e..62fc88a482e7ef5 100755 --- a/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh +++ b/tests/bsim/bluetooth/host/gatt/notify_multiple/test_scripts/notify.sh @@ -11,6 +11,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client -RealEncryption=1 diff --git a/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml b/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml new file mode 100644 index 000000000000000..32fa61ba77eb216 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/notify_multiple/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.gatt.notify_multiple: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf diff --git a/tests/bsim/bluetooth/host/gatt/sc_indicate/compile.sh b/tests/bsim/bluetooth/host/gatt/sc_indicate/compile.sh deleted file mode 100755 index 80030a894f2b388..000000000000000 --- a/tests/bsim/bluetooth/host/gatt/sc_indicate/compile.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh b/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh index 73ec66146aef595..60c470fb4de41f5 100755 --- a/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh +++ b/tests/bsim/bluetooth/host/gatt/sc_indicate/test_scripts/sc_indicate.sh @@ -5,6 +5,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name='sc_indicate' +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_${test_name}_prj_conf" simulation_id="${test_name}" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml b/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml new file mode 100644 index 000000000000000..f799e1e6e384098 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/sc_indicate/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.gatt.sc_indicate: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_sc_indicate_prj_conf diff --git a/tests/bsim/bluetooth/host/gatt/settings/compile.sh b/tests/bsim/bluetooth/host/gatt/settings/compile.sh deleted file mode 100755 index cb72bfca81cb220..000000000000000 --- a/tests/bsim/bluetooth/host/gatt/settings/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_2.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/settings/prj_2.conf b/tests/bsim/bluetooth/host/gatt/settings/prj_2.conf index 96e7123aad19954..491637d1949f243 100644 --- a/tests/bsim/bluetooth/host/gatt/settings/prj_2.conf +++ b/tests/bsim/bluetooth/host/gatt/settings/prj_2.conf @@ -1,26 +1 @@ -CONFIG_BT=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_DEVICE_NAME="GATT settings" - -CONFIG_LOG=y -CONFIG_ASSERT=y -CONFIG_BT_TESTING=y - -CONFIG_BT_AUTO_PHY_UPDATE=n -CONFIG_BT_AUTO_DATA_LEN_UPDATE=n -CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n - -CONFIG_BT_SMP=y -CONFIG_BT_GATT_CLIENT=y -CONFIG_BT_GATT_DYNAMIC_DB=y -CONFIG_BT_GATT_CACHING=y - -CONFIG_SETTINGS=y -CONFIG_SETTINGS_CUSTOM=y -CONFIG_BT_SETTINGS=y - -CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y -CONFIG_BT_GATT_AUTO_RESUBSCRIBE=n - CONFIG_BT_PRIVACY=y diff --git a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh index e6012eb616a5f07..582097f76c0ca29 100755 --- a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh +++ b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="settings" verbosity_level=2 EXECUTE_TIMEOUT=120 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_2.sh b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_2.sh index b4d3d16b01ff1fe..1e0a174e9b38254 100755 --- a/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_2.sh +++ b/tests/bsim/bluetooth/host/gatt/settings/test_scripts/run_gatt_settings_2.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="settings_2" verbosity_level=2 EXECUTE_TIMEOUT=120 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_2_exe="./bs_${BOARD_TS}_$(guess_test_long_name)_prj_2_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml b/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml new file mode 100644 index 000000000000000..0a888cf42cf0b1c --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/settings/testcase.yaml @@ -0,0 +1,17 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.gatt.settings: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_settings_prj_conf + bluetooth.host.gatt.settings_2: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_gatt_settings_prj_2_conf + extra_args: + EXTRA_CONF_FILE=prj_2.conf diff --git a/tests/bsim/bluetooth/host/id/settings/compile.sh b/tests/bsim/bluetooth/host/id/settings/compile.sh deleted file mode 100755 index 718910a63c44d2b..000000000000000 --- a/tests/bsim/bluetooth/host/id/settings/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh b/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh index ea9f7660887ae55..371909d7c492ed7 100755 --- a/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh +++ b/tests/bsim/bluetooth/host/id/settings/test_scripts/settings.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_id_settings_prj_conf" simulation_id="id_settings" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/id/settings/testcase.yaml b/tests/bsim/bluetooth/host/id/settings/testcase.yaml new file mode 100644 index 000000000000000..ca1893fd4d428f4 --- /dev/null +++ b/tests/bsim/bluetooth/host/id/settings/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.id.settings: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_id_settings_prj_conf diff --git a/tests/bsim/bluetooth/host/iso/bis/testcase.yaml b/tests/bsim/bluetooth/host/iso/bis/testcase.yaml new file mode 100644 index 000000000000000..90c105ff742b60f --- /dev/null +++ b/tests/bsim/bluetooth/host/iso/bis/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.iso.bis: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_iso_bis_prj_conf diff --git a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/_compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh index 18c76e299e37e71..a92d632a6fae641 100755 --- a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh +++ b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster diff --git a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh index 980af68ee6f0460..3ea6295df86c308 100755 --- a/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh +++ b/tests/bsim/bluetooth/host/iso/bis/tests_scripts/bis_disable.sh @@ -9,6 +9,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_bis_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster_disable diff --git a/tests/bsim/bluetooth/host/iso/cis/testcase.yaml b/tests/bsim/bluetooth/host/iso/cis/testcase.yaml new file mode 100644 index 000000000000000..44e40818e0815e4 --- /dev/null +++ b/tests/bsim/bluetooth/host/iso/cis/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.iso.cis: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_iso_cis_prj_conf diff --git a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/_compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh index b693f09456737a7..5de0577875d9214 100755 --- a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh +++ b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central diff --git a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh index cb20190d668fb9f..42b250d6a466d4c 100755 --- a/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh +++ b/tests/bsim/bluetooth/host/iso/cis/tests_scripts/cis_disable.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_cis_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central_disable diff --git a/tests/bsim/bluetooth/host/iso/frag/testcase.yaml b/tests/bsim/bluetooth/host/iso/frag/testcase.yaml new file mode 100644 index 000000000000000..fa9983a90ed7970 --- /dev/null +++ b/tests/bsim/bluetooth/host/iso/frag/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.iso.frag: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_iso_frag_prj_conf diff --git a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/iso/frag/tests_scripts/_compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh index 5808c885310b381..7ad517f3543d316 100755 --- a/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh +++ b/tests/bsim/bluetooth/host/iso/frag/tests_scripts/bis.sh @@ -12,6 +12,10 @@ cd ${BSIM_OUT_PATH}/bin Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ -D=1 -sim_length=30e6 $@ +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_frag_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster diff --git a/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml b/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml new file mode 100644 index 000000000000000..4f3c7e4efd3d9c1 --- /dev/null +++ b/tests/bsim/bluetooth/host/iso/frag_2/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.iso.frag_2: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_iso_frag_2_prj_conf diff --git a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/_compile.sh deleted file mode 100755 index f46c09eab660412..000000000000000 --- a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh b/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh index c6307d33027131e..0eb9c07054b9913 100755 --- a/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh +++ b/tests/bsim/bluetooth/host/iso/frag_2/tests_scripts/bis.sh @@ -12,6 +12,10 @@ cd ${BSIM_OUT_PATH}/bin Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ -D=1 -sim_length=30e6 $@ +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_iso_frag_2_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=broadcaster diff --git a/tests/bsim/bluetooth/host/l2cap/compile.sh b/tests/bsim/bluetooth/host/l2cap/compile.sh deleted file mode 100755 index ddb7f5d14bcf85e..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/compile.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app=tests/bsim/bluetooth/host/l2cap/many_conns compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/compile.sh -app=tests/bsim/bluetooth/host/l2cap/general compile -app=tests/bsim/bluetooth/host/l2cap/userdata compile -app=tests/bsim/bluetooth/host/l2cap/stress compile -app=tests/bsim/bluetooth/host/l2cap/stress conf_file=prj_nofrag.conf compile -app=tests/bsim/bluetooth/host/l2cap/stress conf_file=prj_syswq.conf compile -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/split/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/reassembly/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/einprogress/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/ecred/compile.sh -app=tests/bsim/bluetooth/host/l2cap/credits compile -app=tests/bsim/bluetooth/host/l2cap/credits conf_file=prj_ecred.conf compile -app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv compile -app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv conf_file=prj_ecred.conf compile -app=tests/bsim/bluetooth/host/l2cap/send_on_connect compile -app=tests/bsim/bluetooth/host/l2cap/send_on_connect conf_file=prj_ecred.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml new file mode 100644 index 000000000000000..14464d9800cffc1 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/credits/testcase.yaml @@ -0,0 +1,17 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.l2cap.credits: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_prj_conf + bluetooth.host.l2cap.credits_ecred: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_prj_ecred_conf + extra_args: + CONF_FILE=prj_ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/_compile.sh deleted file mode 100755 index 12c5b3882614283..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_ecred.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh index 5595dde430cd4d8..e220875b7e24320 100755 --- a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh +++ b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id=$(guess_test_long_name) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh index 46ba8a2703347dd..58b2ab17523698e 100755 --- a/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh +++ b/tests/bsim/bluetooth/host/l2cap/credits/tests_scripts/l2cap_credits_ecred.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id=$(guess_test_long_name)_ecred +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_ecred_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml new file mode 100644 index 000000000000000..2e591a7ed462175 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/testcase.yaml @@ -0,0 +1,17 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.l2cap.credits_seg_recv: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_seg_recv_prj_conf + bluetooth.host.l2cap.credits_seg_recv_ecred: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_credits_seg_recv_prj_ecred_conf + extra_args: + CONF_FILE=prj_ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/_compile.sh deleted file mode 100755 index 12c5b3882614283..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_ecred.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh index 5595dde430cd4d8..e220875b7e24320 100755 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id=$(guess_test_long_name) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh index 46ba8a2703347dd..58b2ab17523698e 100755 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/tests_scripts/l2cap_credits_seg_recv_ecred.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id=$(guess_test_long_name)_ecred +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_$(guess_test_long_name)_prj_ecred_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/compile.sh b/tests/bsim/bluetooth/host/l2cap/ecred/compile.sh deleted file mode 100755 index 44b965da81d21b9..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/ecred/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)/dut" compile -app="$(guess_test_relpath)/peer" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml new file mode 100644 index 000000000000000..6739fd4192763e0 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/ecred/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.ecred.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_ecred_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml new file mode 100644 index 000000000000000..41da809cd1167a2 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/ecred/peer/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.ecred.peer: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_ecred_peer_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh index 43ac0f88e659b13..263bc4ca88df9c0 100755 --- a/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/l2cap/ecred/test_scripts/run.sh @@ -13,6 +13,10 @@ verbosity_level=2 SIM_LEN_US=$((1 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" peer_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_peer_prj_conf" diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/compile.sh b/tests/bsim/bluetooth/host/l2cap/einprogress/compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/einprogress/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh index b86db52d9dfc029..dbb71c38f39621e 100755 --- a/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/l2cap/einprogress/test_scripts/run.sh @@ -12,6 +12,10 @@ verbosity_level=2 EXECUTE_TIMEOUT=120 SIM_LEN_US=$((2 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml new file mode 100644 index 000000000000000..ded4fde2e908531 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/einprogress/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.einprogress: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_einprogress_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml new file mode 100644 index 000000000000000..deff4dd3b68bcea --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/general/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.general: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_general_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh index 3784ccfa1e0cc2c..1cc355515147282 100755 --- a/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh +++ b/tests/bsim/bluetooth/host/l2cap/general/tests_scripts/l2cap.sh @@ -11,6 +11,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_general_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -rs=43 diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml new file mode 100644 index 000000000000000..33c52570eea89a8 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/many_conns/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.many_conns: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_many_conns_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/_compile.sh deleted file mode 100755 index 5ac4d05a20f541e..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/_compile.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh index ee3c308f5743744..d5dc20d769f29ae 100755 --- a/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh +++ b/tests/bsim/bluetooth/host/l2cap/many_conns/tests_scripts/l2cap.sh @@ -6,6 +6,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="l2cap_many_conns" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_many_conns_prj_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/compile.sh b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/compile.sh deleted file mode 100755 index f46c09eab660412..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh index 1e4752d2c4aea23..c50296c24e5f796 100755 --- a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/test_scripts/run.sh @@ -12,6 +12,10 @@ simulation_id=${test_name} SIM_LEN_US=$((40 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml new file mode 100644 index 000000000000000..bcaf6b151f4409f --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.multilink_peripheral: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_multilink_peripheral_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/compile.sh b/tests/bsim/bluetooth/host/l2cap/reassembly/compile.sh deleted file mode 100755 index 5f8dcb7d5198b5e..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)/dut" compile -app="$(guess_test_relpath)/peer" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml new file mode 100644 index 000000000000000..d4be7813624bb43 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.reassembly.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_reassembly_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml new file mode 100644 index 000000000000000..5c9360e55eee43e --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/peer/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.reassembly.peer: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_reassembly_peer_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh b/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh index 8a50896d8d525b8..5c9802a01142883 100755 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/test_scripts/run.sh @@ -15,6 +15,10 @@ verbosity_level=2 # The test will exit simulation as soon as it has passed. SIM_LEN_US=$((10 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" peer_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_peer_prj_conf" diff --git a/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml new file mode 100644 index 000000000000000..a477530e8eb3a95 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/send_on_connect/testcase.yaml @@ -0,0 +1,18 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + +tests: + bluetooth.host.l2cap.send_on_connect: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf + bluetooth.host.l2cap.send_on_connect_ecred: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_ecred_conf + extra_args: + CONF_FILE=prj_ecred.conf diff --git a/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh index 32c5eebda06da60..7b93dea4c256c61 100755 --- a/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh +++ b/tests/bsim/bluetooth/host/l2cap/send_on_connect/tests_scripts/l2cap.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_send_on_connect_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central diff --git a/tests/bsim/bluetooth/host/l2cap/split/compile.sh b/tests/bsim/bluetooth/host/l2cap/split/compile.sh deleted file mode 100755 index ff0f485b17d58b0..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/split/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/dut compile -app="$(guess_test_relpath)"/tester compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml new file mode 100644 index 000000000000000..cf9234abaa1c06b --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/split/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.split.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_split_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh b/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh index fe3c34950252ae2..b1ee8ebe872b948 100755 --- a/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh +++ b/tests/bsim/bluetooth/host/l2cap/split/test_scripts/l2cap_split.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml new file mode 100644 index 000000000000000..19b9e357b8cc7da --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/split/tester/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.split.tester: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_split_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml new file mode 100644 index 000000000000000..3897cf0a10919de --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/stress/testcase.yaml @@ -0,0 +1,22 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.l2cap.stress: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_conf + bluetooth.host.l2cap.stress_nofrag: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_nofrag_conf + extra_args: + CONF_FILE=prj_nofrag.conf + bluetooth.host.l2cap.stress_syswq: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_stress_prj_syswq_conf + extra_args: + CONF_FILE=prj_syswq.conf diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/_compile.sh deleted file mode 100755 index b446204dce8ed2d..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/_compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_nofrag.conf compile -app="$(guess_test_relpath)" conf_file=prj_syswq.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh index 975a5abd232c83b..bad50fc634f74d7 100755 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh +++ b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap.sh @@ -9,6 +9,10 @@ simulation_id="l2cap_stress" verbosity_level=2 EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh index 4d4bb7f9152f721..7d4860d68849502 100755 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh +++ b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_nofrag.sh @@ -9,6 +9,10 @@ simulation_id="l2cap_stress_nofrag" verbosity_level=2 EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_nofrag_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh index b6e24b067801aeb..aede185b130d975 100755 --- a/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh +++ b/tests/bsim/bluetooth/host/l2cap/stress/tests_scripts/l2cap_syswq.sh @@ -9,6 +9,10 @@ simulation_id="l2cap_stress_syswq" verbosity_level=2 EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_stress_prj_syswq_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml b/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml new file mode 100644 index 000000000000000..ac581a18e8d2f48 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/userdata/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.l2cap.userdata: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_l2cap_userdata_prj_conf diff --git a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/_compile.sh deleted file mode 100755 index 80030a894f2b388..000000000000000 --- a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/_compile.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh b/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh index e5bcdd078c0d92d..f9010e9a34d3b98 100755 --- a/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh +++ b/tests/bsim/bluetooth/host/l2cap/userdata/tests_scripts/l2cap.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_l2cap_userdata_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/compile.sh b/tests/bsim/bluetooth/host/misc/acl_tx_frag/compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/misc/acl_tx_frag/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh index e742f59b18f000d..e6a039101d7ec41 100755 --- a/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/misc/acl_tx_frag/test_scripts/run.sh @@ -15,6 +15,10 @@ EXECUTE_TIMEOUT=120 # The test will exit simulation as soon as it has passed. SIM_LEN_US=$((60 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml b/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml new file mode 100644 index 000000000000000..7438d515d1f98a4 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/acl_tx_frag/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.mics.acl_tx_frag: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_acl_tx_frag_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml b/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml new file mode 100644 index 000000000000000..c46d78849f6cc26 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/conn_stress/central/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.conn_stress.central: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_conn_stress_central_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml new file mode 100644 index 000000000000000..9c79a57870a9a81 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.conn_stress.peripheral: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_conn_stress_peripheral_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/disable/testcase.yaml b/tests/bsim/bluetooth/host/misc/disable/testcase.yaml new file mode 100644 index 000000000000000..a3e1c693f39999b --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/disable/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.mics.disable: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_disable_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh index 0be9af35e7a71f4..d1566454f33a00a 100755 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh +++ b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable.sh @@ -11,6 +11,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=disable diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh index 437dcdff139af13..606d0e7074f5ce0 100755 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh +++ b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_set_default_id.sh @@ -11,6 +11,10 @@ verbosity_level=2 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=disable_set_default_id diff --git a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh index f81a8fe6e4d12c3..e2e9d4f00e46054 100755 --- a/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh +++ b/tests/bsim/bluetooth/host/misc/disable/tests_scripts/disable_with_gatt.sh @@ -14,6 +14,10 @@ EXECUTE_TIMEOUT=120 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_disable_prj_conf \ -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client diff --git a/tests/bsim/bluetooth/host/misc/disconnect/compile.sh b/tests/bsim/bluetooth/host/misc/disconnect/compile.sh deleted file mode 100755 index ff0f485b17d58b0..000000000000000 --- a/tests/bsim/bluetooth/host/misc/disconnect/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)"/dut compile -app="$(guess_test_relpath)"/tester compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml b/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml new file mode 100644 index 000000000000000..5671a365ffa273b --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/disconnect/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.disconnect.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_disconnect_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh b/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh index ada291fa88aa38c..e12dc0c2508ef14 100755 --- a/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh +++ b/tests/bsim/bluetooth/host/misc/disconnect/test_scripts/disconnect.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + dut_exe="bs_${BOARD_TS}_$(guess_test_long_name)_dut_prj_conf" tester_exe="bs_${BOARD_TS}_$(guess_test_long_name)_tester_prj_conf" diff --git a/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml b/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml new file mode 100644 index 000000000000000..7ab4878f0d0b714 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/disconnect/tester/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.disconnect.tester: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_disconnect_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/hfc/compile.sh b/tests/bsim/bluetooth/host/misc/hfc/compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/misc/hfc/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh index cc5eef568b2b1a1..978d8b4d51faccc 100755 --- a/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/misc/hfc/test_scripts/run.sh @@ -10,6 +10,10 @@ EXECUTE_TIMEOUT=240 cd ${BSIM_OUT_PATH}/bin +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_hfc_prj_conf Execute "${bsim_exe}" -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=dut -rs=420 diff --git a/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml new file mode 100644 index 000000000000000..7bd85b467ab2c96 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/hfc/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.mics.hfc: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_hfc_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/compile.sh b/tests/bsim/bluetooth/host/misc/hfc_multilink/compile.sh deleted file mode 100755 index 7527432d4dfe0f9..000000000000000 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)/dut" compile -app="$(guess_test_relpath)/tester" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml new file mode 100644 index 000000000000000..5fe5fecf083ba2f --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.hfc_multilink.dut: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_hfc_multilink_dut_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh index c71b125d5258918..9a3da0e917daae5 100755 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/test_scripts/run.sh @@ -15,6 +15,10 @@ verbosity_level=2 # The test will be terminated much earlier if it passes SIM_LEN_US=$((10 * 1000 * 1000)) +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + tester_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_tester_prj_conf" dut_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_dut_prj_conf" diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml b/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml new file mode 100644 index 000000000000000..eb0ead78d061550 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/tester/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.misc.hfc_multilink.tester: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_hfc_multilink_tester_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/sample_test/compile.sh b/tests/bsim/bluetooth/host/misc/sample_test/compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/misc/sample_test/compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh b/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh index cf96e025b2dc2f3..92801e3a4e5fb63 100755 --- a/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/misc/sample_test/test_scripts/run.sh @@ -53,6 +53,10 @@ SIM_LEN_US=$((2 * 1000 * 1000)) # # In our case, both test cases are compiled in the same image, and the right one # will be run depending on what arguments we give the executable. +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" # BabbleSim will by default search for its shared libraries assuming it is diff --git a/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml b/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml new file mode 100644 index 000000000000000..f4cade5bb50464d --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/sample_test/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.mics.sample_test: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_sample_test_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml new file mode 100644 index 000000000000000..541322ac1744428 --- /dev/null +++ b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.mics.unregister_conn_cb: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_misc_unregister_conn_cb_prj_conf diff --git a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/_compile.sh b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/_compile.sh deleted file mode 100755 index e717a4b2bbef02e..000000000000000 --- a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/_compile.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh index ad2b4dc0bb5178f..8c9ae2a82b57074 100755 --- a/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh +++ b/tests/bsim/bluetooth/host/misc/unregister_conn_cb/tests_scripts/unregister_conn_cb.sh @@ -13,6 +13,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="unregister_conn_cb" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + bsim_exe=./bs_${BOARD_TS}_tests_bsim_bluetooth_host_misc_unregister_conn_cb_prj_conf cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/privacy/central/compile.sh b/tests/bsim/bluetooth/host/privacy/central/compile.sh deleted file mode 100755 index 87cd4f6ba95129b..000000000000000 --- a/tests/bsim/bluetooth/host/privacy/central/compile.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh index 52a410978836215..1b3be8fa950955d 100755 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test.sh @@ -9,6 +9,10 @@ EXECUTE_TIMEOUT=100 verbosity_level=2 simulation_id="$(guess_test_long_name)" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh index 5e15e78517839f2..1f7332466620dea 100755 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh +++ b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_conn_timeout.sh @@ -12,6 +12,10 @@ verbosity_level=2 # timeout is shorter than the connection establishment timeout simulation_id="test_central_connect_fails_with_short_rpa_timeout" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh index 0ed76b2f86ac2a3..1f81d8d2b16c098 100755 --- a/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh +++ b/tests/bsim/bluetooth/host/privacy/central/test_scripts/run_test_short_rpa_timeout.sh @@ -12,6 +12,10 @@ verbosity_level=2 # we expect the connection to be established simulation_id="test_central_connect_short_rpa_timeout" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/privacy/central/testcase.yaml b/tests/bsim/bluetooth/host/privacy/central/testcase.yaml new file mode 100644 index 000000000000000..d230a72ca41a3f5 --- /dev/null +++ b/tests/bsim/bluetooth/host/privacy/central/testcase.yaml @@ -0,0 +1,11 @@ +tests: + bluetooth.host.privacy.central: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_central_prj_conf diff --git a/tests/bsim/bluetooth/host/privacy/device/compile.sh b/tests/bsim/bluetooth/host/privacy/device/compile.sh deleted file mode 100755 index a8e0fb1530e2402..000000000000000 --- a/tests/bsim/bluetooth/host/privacy/device/compile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh b/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh index 87b97841b1579e5..fb9c86489b7f813 100755 --- a/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh +++ b/tests/bsim/bluetooth/host/privacy/device/test_scripts/run_tests.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id="$(guess_test_long_name)" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" cd ${BSIM_OUT_PATH}/bin diff --git a/tests/bsim/bluetooth/host/privacy/device/testcase.yaml b/tests/bsim/bluetooth/host/privacy/device/testcase.yaml new file mode 100644 index 000000000000000..9b2de20abb183bf --- /dev/null +++ b/tests/bsim/bluetooth/host/privacy/device/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.privacy.device: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_device_prj_conf diff --git a/tests/bsim/bluetooth/host/privacy/legacy/compile.sh b/tests/bsim/bluetooth/host/privacy/legacy/compile.sh deleted file mode 100755 index a8e0fb1530e2402..000000000000000 --- a/tests/bsim/bluetooth/host/privacy/legacy/compile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh index 2e83ef3857a74d0..6a52e0302402e5b 100755 --- a/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/privacy/legacy/test_scripts/run_test.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source verbosity_level=2 simulation_id="$(guess_test_long_name)" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml b/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml new file mode 100644 index 000000000000000..3d6b3201e5fddc1 --- /dev/null +++ b/tests/bsim/bluetooth/host/privacy/legacy/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.privacy.legacy: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_legacy_prj_conf diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/compile.sh b/tests/bsim/bluetooth/host/privacy/peripheral/compile.sh deleted file mode 100755 index 47da5e42c62cd62..000000000000000 --- a/tests/bsim/bluetooth/host/privacy/peripheral/compile.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_rpa_expired.conf compile -app="$(guess_test_relpath)" conf_file=prj_rpa_sharing.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_expired.conf b/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_expired.conf index a357a38df39ea81..c3206aa356923b6 100644 --- a/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_expired.conf +++ b/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_expired.conf @@ -1,24 +1,5 @@ -CONFIG_BT=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_SMP=y -CONFIG_ASSERT=y - -CONFIG_BT_EXT_ADV=y -CONFIG_BT_PRIVACY=y -CONFIG_BT_RPA_TIMEOUT=10 CONFIG_BT_EXT_ADV_MAX_ADV_SET=4 -CONFIG_BT_CTLR_ADVANCED_FEATURES=y CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=4 -CONFIG_BT_ID_MAX=3 - -CONFIG_FLASH=y -CONFIG_FLASH_MAP=y -CONFIG_NVS=y -CONFIG_SETTINGS=y -CONFIG_BT_SETTINGS=y -# Increased stack due to settings API usage -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 # Enable the RPA sharing mode CONFIG_BT_RPA_SHARING=y diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_sharing.conf b/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_sharing.conf index 2c4195b169d9a73..0fa6d5acb3f5eef 100644 --- a/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_sharing.conf +++ b/tests/bsim/bluetooth/host/privacy/peripheral/prj_rpa_sharing.conf @@ -1,24 +1,2 @@ -CONFIG_BT=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_SMP=y -CONFIG_ASSERT=y - -CONFIG_BT_EXT_ADV=y -CONFIG_BT_PRIVACY=y -CONFIG_BT_RPA_TIMEOUT=10 -CONFIG_BT_EXT_ADV_MAX_ADV_SET=3 -CONFIG_BT_CTLR_ADVANCED_FEATURES=y -CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=3 -CONFIG_BT_ID_MAX=3 - -CONFIG_FLASH=y -CONFIG_FLASH_MAP=y -CONFIG_NVS=y -CONFIG_SETTINGS=y -CONFIG_BT_SETTINGS=y -# Increased stack due to settings API usage -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 - # Enable the RPA sharing mode CONFIG_BT_RPA_SHARING=y diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh index f813bf1d86f59ab..67ca061d0a2889d 100755 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test.sh @@ -9,6 +9,10 @@ verbosity_level=2 simulation_id="host_privacy_peripheral" EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh index 90cb146fe798fa1..c3f5b4cf9816470 100755 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh +++ b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_expired.sh @@ -9,6 +9,10 @@ verbosity_level=2 simulation_id="rpa_expired" EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe_rpa_expired="\ ${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_rpa_expired_conf" peripheral_exe_rpa_expired="${central_exe_rpa_expired}" diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh index 49daf4e5a86db88..ce10d6b84868168 100755 --- a/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh +++ b/tests/bsim/bluetooth/host/privacy/peripheral/test_scripts/run_test_rpa_sharing.sh @@ -9,6 +9,10 @@ verbosity_level=2 simulation_id="$(guess_test_long_name)_rpa_sharing" EXECUTE_TIMEOUT=240 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe_rpa_sharing="\ ${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_rpa_sharing_conf" peripheral_exe_rpa_sharing="${central_exe_rpa_sharing}" diff --git a/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml new file mode 100644 index 000000000000000..6110d056304ca13 --- /dev/null +++ b/tests/bsim/bluetooth/host/privacy/peripheral/testcase.yaml @@ -0,0 +1,23 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + - nrf5340bsim/nrf5340/cpunet + harness: bsim + +tests: + bluetooth.host.privacy.peripheral: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_conf + bluetooth.host.privacy.peripheral_rpa_expired: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_expired_conf + extra_args: + EXTRA_CONF_FILE=prj_rpa_expired.conf + bluetooth.host.privacy.peripheral_rpa_sharing: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_privacy_peripheral_prj_rpa_sharing_conf + extra_args: + EXTRA_CONF_FILE=prj_rpa_sharing.conf diff --git a/tests/bsim/bluetooth/host/scan/slow/compile.sh b/tests/bsim/bluetooth/host/scan/slow/compile.sh deleted file mode 100755 index b7b1eea135e73d4..000000000000000 --- a/tests/bsim/bluetooth/host/scan/slow/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2024 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh b/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh index 0b893952d32e72c..ccfb09b1235f3d0 100755 --- a/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh +++ b/tests/bsim/bluetooth/host/scan/slow/test_scripts/run.sh @@ -5,6 +5,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name="$(guess_test_long_name)" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_name}_prj_conf" simulation_id=${test_name} diff --git a/tests/bsim/bluetooth/host/scan/slow/testcase.yaml b/tests/bsim/bluetooth/host/scan/slow/testcase.yaml new file mode 100644 index 000000000000000..e4a931b509c338a --- /dev/null +++ b/tests/bsim/bluetooth/host/scan/slow/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.scan.slow: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_scan_slow_prj_conf diff --git a/tests/bsim/bluetooth/host/scan/start_stop/compile.sh b/tests/bsim/bluetooth/host/scan/start_stop/compile.sh deleted file mode 100755 index 718910a63c44d2b..000000000000000 --- a/tests/bsim/bluetooth/host/scan/start_stop/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh b/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh index 2e172fdde7c978e..306c47679e5469e 100755 --- a/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh +++ b/tests/bsim/bluetooth/host/scan/start_stop/test_scripts/start_stop.sh @@ -4,6 +4,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_scan_start_stop_prj_conf" simulation_id="start_stop" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml b/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml new file mode 100644 index 000000000000000..0e90b6ca1f857dc --- /dev/null +++ b/tests/bsim/bluetooth/host/scan/start_stop/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.scan.start_stop: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_scan_start_stop_prj_conf diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/compile.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/compile.sh deleted file mode 100755 index 7bb547b3f25ba95..000000000000000 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/compile.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh index 1c84dda23ae47d7..b138524ed04ba9d 100755 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/test_scripts/run_test.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="security_bond_overwrite_allowed" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml new file mode 100644 index 000000000000000..fb591d9cfa595bf --- /dev/null +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.bond_overwrite_allowed: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_bond_overwrite_allowed_prj_conf diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/compile.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/compile.sh deleted file mode 100755 index b3605e1ee2b07d4..000000000000000 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/compile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh index ea61a870aa26ec1..17802f7b734e572 100755 --- a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/test_scripts/run_test.sh @@ -8,6 +8,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source simulation_id="security_bond_overwrite_denied" verbosity_level=2 +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml new file mode 100644 index 000000000000000..3de9776beb09ad5 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/bond_overwrite_denied/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.bond_overwrite_denied: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_bond_overwrite_denied_prj_conf diff --git a/tests/bsim/bluetooth/host/security/bond_per_connection/compile.sh b/tests/bsim/bluetooth/host/security/bond_per_connection/compile.sh deleted file mode 100755 index a8e0fb1530e2402..000000000000000 --- a/tests/bsim/bluetooth/host/security/bond_per_connection/compile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh index d7c87b399c030df..9f1aac43b817530 100755 --- a/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/security/bond_per_connection/test_scripts/run_test.sh @@ -9,6 +9,10 @@ verbosity_level=2 simulation_id="security_bond_per_connection" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_$(guess_test_long_name)_prj_conf" peripheral_exe="${central_exe}" diff --git a/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml b/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml new file mode 100644 index 000000000000000..6de18ebcb4457af --- /dev/null +++ b/tests/bsim/bluetooth/host/security/bond_per_connection/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.bond_per_connection: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_bond_per_connection_prj_conf diff --git a/tests/bsim/bluetooth/host/security/ccc_update/compile.sh b/tests/bsim/bluetooth/host/security/ccc_update/compile.sh deleted file mode 100755 index e33fe48bdbed09b..000000000000000 --- a/tests/bsim/bluetooth/host/security/ccc_update/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" compile -app="$(guess_test_relpath)" conf_file=prj_2.conf compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/ccc_update/prj_2.conf b/tests/bsim/bluetooth/host/security/ccc_update/prj_2.conf index cab868651476678..55b530ae9e20744 100644 --- a/tests/bsim/bluetooth/host/security/ccc_update/prj_2.conf +++ b/tests/bsim/bluetooth/host/security/ccc_update/prj_2.conf @@ -1,25 +1,3 @@ -CONFIG_BT=y -CONFIG_BT_CENTRAL=y -CONFIG_BT_PERIPHERAL=y -CONFIG_BT_DEVICE_NAME="CCC Update Test" - -CONFIG_LOG=y - -CONFIG_BT_EXT_ADV=y -CONFIG_BT_MAX_CONN=3 -CONFIG_BT_GATT_CLIENT=y - # Disable CCC lazy loading, this cause the CCC config to not be cleared at # disconnection CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=n - -CONFIG_BT_SMP=y - -CONFIG_SETTINGS=y -CONFIG_BT_SETTINGS=y -CONFIG_FLASH=y -CONFIG_NVS=y -CONFIG_FLASH_MAP=y -CONFIG_SETTINGS_NVS=y - -CONFIG_ASSERT=y diff --git a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh index bb4aab2b0dcc3c6..f2851c1e206dbe4 100755 --- a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh +++ b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh @@ -5,6 +5,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name='ccc_update' +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_conf" simulation_id="${test_name}" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_2.sh b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_2.sh index eb165fa85f05e2d..5fc8e4ddf05d347 100755 --- a/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_2.sh +++ b/tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_2.sh @@ -5,6 +5,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name='ccc_update' +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_2_conf" simulation_id="${test_name}_2" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml b/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml new file mode 100644 index 000000000000000..428d4774ec2b526 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/ccc_update/testcase.yaml @@ -0,0 +1,17 @@ +common: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + +tests: + bluetooth.host.security.ccc_update: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_ccc_update_prj_conf + bluetooth.host.security.ccc_update_2: + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_ccc_update_prj_2_conf + extra_args: + EXTRA_CONF_FILE=prj_2.conf diff --git a/tests/bsim/bluetooth/host/security/compile.sh b/tests/bsim/bluetooth/host/security/compile.sh deleted file mode 100755 index e837aec52668070..000000000000000 --- a/tests/bsim/bluetooth/host/security/compile.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -# Compile all the applications needed by the bsim tests in these subfolders - -#set -x #uncomment this line for debugging -set -ue -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -run_in_background \ - ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_overwrite_denied/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_per_connection/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/ccc_update/compile.sh -run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/id_addr_update/compile.sh -run_in_background \ - ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/security_changed_callback/compile.sh - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml b/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml new file mode 100644 index 000000000000000..c3a760336546e69 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/id_addr_update/central/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.id_addr_update.central: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_id_addr_update_central_prj_conf diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/compile.sh b/tests/bsim/bluetooth/host/security/id_addr_update/compile.sh deleted file mode 100755 index f0f386a9e6bbbeb..000000000000000 --- a/tests/bsim/bluetooth/host/security/id_addr_update/compile.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)/central" compile -app="$(guess_test_relpath)/peripheral" compile - -wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml b/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml new file mode 100644 index 000000000000000..86e6ada14095b30 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/id_addr_update/peripheral/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.id_addr_update.peripheral: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_id_addr_update_peripheral_prj_conf diff --git a/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh b/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh index 3ff3d35db0ec5d9..016ee6c5021eb80 100755 --- a/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh +++ b/tests/bsim/bluetooth/host/security/id_addr_update/test_scripts/run_test.sh @@ -9,6 +9,10 @@ verbosity_level=2 simulation_id="id_addr_update" test_path="$(guess_test_long_name)" +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + central_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_path}_central_prj_conf" peripheral_exe="${BSIM_OUT_PATH}/bin/bs_${BOARD_TS}_${test_path}_peripheral_prj_conf" diff --git a/tests/bsim/bluetooth/host/security/security_changed_callback/compile.sh b/tests/bsim/bluetooth/host/security/security_changed_callback/compile.sh deleted file mode 100755 index a8e0fb1530e2402..000000000000000 --- a/tests/bsim/bluetooth/host/security/security_changed_callback/compile.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -set -eu -: "${ZEPHYR_BASE:?ZEPHYR_BASE must be defined}" - -INCR_BUILD=1 - -source ${ZEPHYR_BASE}/tests/bsim/compile.source - -app="$(guess_test_relpath)" _compile diff --git a/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh b/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh index 287eeeee152dde8..cd17364bf72cf0e 100755 --- a/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh +++ b/tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh @@ -5,6 +5,10 @@ source ${ZEPHYR_BASE}/tests/bsim/sh_common.source test_name='security_changed_callback' +if [ "${BOARD_TS}" = "nrf52_bsim" ]; then + BOARD_TS="${BOARD_TS}_native" +fi + test_exe="bs_${BOARD_TS}_tests_bsim_bluetooth_host_security_${test_name}_prj_conf" simulation_id="${test_name}" verbosity_level=2 diff --git a/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml b/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml new file mode 100644 index 000000000000000..32ee52c54741361 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/security_changed_callback/testcase.yaml @@ -0,0 +1,10 @@ +tests: + bluetooth.host.security.security_changed_callback: + build_only: true + tags: + - bluetooth + platform_allow: + - nrf52_bsim + harness: bsim + harness_config: + bsim_exe_name: tests_bsim_bluetooth_host_security_security_changed_callback_prj_conf diff --git a/tests/bsim/bluetooth/host/tests.nrf5340bsim_nrf5340_cpunet.sh b/tests/bsim/bluetooth/host/tests.nrf5340bsim_nrf5340_cpunet.sh new file mode 100755 index 000000000000000..d6bb8d6955279dc --- /dev/null +++ b/tests/bsim/bluetooth/host/tests.nrf5340bsim_nrf5340_cpunet.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copyright 2024 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Run bluetooth/host tests that support nrf5340bsim/nrf5340/cpunet platform + +set -ue + +: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}" + +board=nrf5340bsim/nrf5340/cpunet +test_spec=testlist.json + +west twister -T ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/ -p ${board} -E ${test_spec} + +parse_cmd="['${ZEPHYR_BASE}/' + it['path'] for it in json.load(open('${test_spec}'))['testsuites']]" +search_path=`python3 -c "import sys, json; print(' '.join(set(${parse_cmd})))"` + +rm -f ${test_spec} + +BOARD=${board} \ +RESULTS_FILE=${ZEPHYR_BASE}/bsim_out/bsim_results.bt.host.53_cpunet.xml \ +SEARCH_PATH=${search_path} \ +${ZEPHYR_BASE}/tests/bsim/run_parallel.sh diff --git a/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt b/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt index 1d9d73630db5c9c..750067920497885 100644 --- a/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt +++ b/tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt @@ -2,3 +2,16 @@ # built in the net core) # This file is used in CI to select which tests are run tests/bsim/bluetooth/ll/ +tests/bsim/bluetooth/host/att/eatt_notif +tests/bsim/bluetooth/host/misc/disable +tests/bsim/bluetooth/host/misc/unregister_conn_cb +tests/bsim/bluetooth/host/adv/periodic +tests/bsim/bluetooth/host/adv/extended +tests/bsim/bluetooth/host/adv/chain +tests/bsim/bluetooth/host/l2cap/send_on_connect +tests/bsim/bluetooth/host/central +tests/bsim/bluetooth/host/privacy/peripheral +tests/bsim/bluetooth/host/privacy/central +tests/bsim/bluetooth/host/gatt/authorization +tests/bsim/bluetooth/host/gatt/general +tests/bsim/bluetooth/host/gatt/caching