Skip to content

Commit 9a9ccfe

Browse files
Andries Kruithofnashif
authored andcommitted
tests: edtt run gap and gatt tests with new LLCP
For consistency we run the gatt and gap tests also with the new LLCP. The test lists for legacy and new LLCP are identical and therefor no separate test lists have been introduced Signed-off-by: Andries Kruithof <[email protected]>
1 parent cc94cfd commit 9a9ccfe

File tree

5 files changed

+98
-2
lines changed

5 files changed

+98
-2
lines changed

tests/bluetooth/bsim_bt/compile.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ app=tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app \
3838
conf_file=prj_dut.conf compile
3939
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app \
4040
conf_file=prj_tst.conf compile
41-
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app compile
41+
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
42+
conf_file=prj.conf compile
43+
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
44+
conf_file=prj_llcp.conf compile
4245
app=tests/bluetooth/bsim_bt/bsim_test_mesh compile
4346
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_low_lat.conf compile
4447
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_pst.conf compile
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2019 Oticon A/S
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_BT=y
5+
CONFIG_BT_SMP=y
6+
CONFIG_BT_SIGNING=y
7+
CONFIG_BT_TINYCRYPT_ECC=y
8+
CONFIG_BT_PERIPHERAL=y
9+
CONFIG_BT_ATT_PREPARE_COUNT=2
10+
CONFIG_BT_PRIVACY=y
11+
CONFIG_BT_DEVICE_NAME="Test Database"
12+
CONFIG_BT_DEVICE_APPEARANCE=833
13+
CONFIG_BT_GATT_DYNAMIC_DB=y
14+
15+
CONFIG_BT_CTLR=y
16+
CONFIG_BT_LL_SW_SPLIT=y
17+
18+
CONFIG_BT_HCI_ACL_FLOW_CONTROL=y
19+
CONFIG_BT_BUF_ACL_RX_SIZE=516
20+
CONFIG_BT_L2CAP_TX_MTU=512
21+
CONFIG_BT_DEBUG_LOG=y
22+
23+
# NOTE: In order to get ACL_FLOW_CONTROL to work it is imperative that
24+
# BT_CTRL_RX_BUFFERS is increased from its default value of 1.
25+
CONFIG_BT_CTLR_RX_BUFFERS=3
26+
27+
# To make DEVICE Name writable...
28+
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
29+
30+
CONFIG_BT_LL_SW_LLCP_LEGACY=n
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2019 Oticon A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# GAP regression tests based on the EDTTool
6+
CWD="$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)"
7+
8+
export SIMULATION_ID="edtt_gap"
9+
export TEST_FILE=${CWD}"/gap.test_list"
10+
export TEST_MODULE="gap_verification"
11+
export PRJ_CONF_1="prj_dut_llcp_conf"
12+
export PRJ_CONF_2="prj_tst_llcp_conf"
13+
14+
${CWD}/_controller_tests_inner.sh

tests/bluetooth/bsim_bt/edtt_ble_test_app/tests_scripts/gap.test_list

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ GAP/CONN/ACEP/BV-01-C
2020
GAP/CONN/ACEP/BV-03-C
2121
GAP/CONN/ACEP/BV-04-C
2222
GAP/CONN/DCON/BV-01-C
23-
#GAP/CONN/ENC
2423
GAP/CONN/GCEP/BV-01-C
2524
GAP/CONN/GCEP/BV-02-C
2625
GAP/CONN/GCEP/BV-05-C
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2019 Oticon A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# GATT regression tests based on the EDTTool
6+
SIMULATION_ID="edtt_gatt"
7+
VERBOSITY_LEVEL=2
8+
PROCESS_IDS=""; EXIT_CODE=0
9+
CWD="$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)"
10+
11+
function Execute(){
12+
if [ ! -f $1 ]; then
13+
echo -e " \e[91m`pwd`/`basename $1` cannot be found (did you forget to\
14+
compile it?)\e[39m"
15+
exit 1
16+
fi
17+
timeout 300 $@ & PROCESS_IDS="$PROCESS_IDS $!"
18+
}
19+
20+
: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
21+
: "${EDTT_PATH:?EDTT_PATH must be defined}"
22+
23+
#Give a default value to BOARD if it does not have one yet:
24+
BOARD="${BOARD:-nrf52_bsim}"
25+
26+
cd ${EDTT_PATH}
27+
28+
Execute ./src/edttool.py -s=${SIMULATION_ID} -d=0 --transport bsim \
29+
-T gatt_verification -C "${CWD}/gatt.test_list" -v=${VERBOSITY_LEVEL}
30+
31+
cd ${BSIM_OUT_PATH}/bin
32+
33+
Execute ./bs_device_EDTT_bridge -s=${SIMULATION_ID} -d=0 -AutoTerminate \
34+
-RxWait=2.5e3 -D=2 -dev0=1 -dev1=2 -v=${VERBOSITY_LEVEL}
35+
36+
Execute \
37+
./bs_${BOARD}_tests_bluetooth_bsim_bt_edtt_ble_test_app_hci_test_app_prj_tst_llcp_conf\
38+
-s=${SIMULATION_ID} -d=1 -v=${VERBOSITY_LEVEL} -RealEncryption=1
39+
40+
Execute \
41+
./bs_${BOARD}_tests_bluetooth_bsim_bt_edtt_ble_test_app_gatt_test_app_prj_llcp_conf\
42+
-s=${SIMULATION_ID} -d=2 -v=${VERBOSITY_LEVEL} -RealEncryption=1
43+
44+
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
45+
-D=3 -sim_length=3600e6 $@
46+
47+
for PROCESS_ID in $PROCESS_IDS; do
48+
wait $PROCESS_ID || let "EXIT_CODE=$?"
49+
done
50+
exit $EXIT_CODE #the last exit code != 0

0 commit comments

Comments
 (0)