-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: bsim: bluetooth: host: use twister to compile tests
Bluetooth host bsim tests are compiled with shell scripts, but it is possible to use twister, which supports compilation (but not running at the moment). Copiling with twister provides cleaner interface and more flexible configuration. Signed-off-by: Artur Dobrynin <[email protected]>
- Loading branch information
1 parent
065bd32
commit 08b5104
Showing
239 changed files
with
1,298 additions
and
944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
tests/bsim/bluetooth/host/_tests.nrf5340bsim_nrf5340_cpunet.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/testcase.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/bsim/bluetooth/host/adv/encrypted/ead_sample/testcase.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.