Commit 9a9ccfec authored by Andries Kruithof's avatar Andries Kruithof Committed by Anas Nashif
Browse files

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: default avatarAndries Kruithof <Andries.Kruithof@nordicsemi.no>
parent cc94cfd1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -38,7 +38,10 @@ app=tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app \
  conf_file=prj_dut.conf compile
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/hci_test_app \
  conf_file=prj_tst.conf compile
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app compile
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
  conf_file=prj.conf compile
app=tests/bluetooth/bsim_bt/edtt_ble_test_app/gatt_test_app \
  conf_file=prj_llcp.conf compile
app=tests/bluetooth/bsim_bt/bsim_test_mesh compile
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_low_lat.conf compile
app=tests/bluetooth/bsim_bt/bsim_test_mesh conf_file=prj_pst.conf compile
+30 −0
Original line number Diff line number Diff line
# Copyright (c) 2019 Oticon A/S
# SPDX-License-Identifier: Apache-2.0

CONFIG_BT=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_PRIVACY=y
CONFIG_BT_DEVICE_NAME="Test Database"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_GATT_DYNAMIC_DB=y

CONFIG_BT_CTLR=y
CONFIG_BT_LL_SW_SPLIT=y

CONFIG_BT_HCI_ACL_FLOW_CONTROL=y
CONFIG_BT_BUF_ACL_RX_SIZE=516
CONFIG_BT_L2CAP_TX_MTU=512
CONFIG_BT_DEBUG_LOG=y

# NOTE: In order to get ACL_FLOW_CONTROL to work it is imperative that
# BT_CTRL_RX_BUFFERS is increased from its default value of 1.
CONFIG_BT_CTLR_RX_BUFFERS=3

# To make DEVICE Name writable...
CONFIG_BT_DEVICE_NAME_DYNAMIC=y

CONFIG_BT_LL_SW_LLCP_LEGACY=n
+14 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
# Copyright 2019 Oticon A/S
# SPDX-License-Identifier: Apache-2.0

# GAP regression tests based on the EDTTool
CWD="$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)"

export SIMULATION_ID="edtt_gap"
export TEST_FILE=${CWD}"/gap.test_list"
export TEST_MODULE="gap_verification"
export PRJ_CONF_1="prj_dut_llcp_conf"
export PRJ_CONF_2="prj_tst_llcp_conf"

${CWD}/_controller_tests_inner.sh
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ GAP/CONN/ACEP/BV-01-C
GAP/CONN/ACEP/BV-03-C
GAP/CONN/ACEP/BV-04-C
GAP/CONN/DCON/BV-01-C
#GAP/CONN/ENC
GAP/CONN/GCEP/BV-01-C
GAP/CONN/GCEP/BV-02-C
GAP/CONN/GCEP/BV-05-C
+50 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash
# Copyright 2019 Oticon A/S
# SPDX-License-Identifier: Apache-2.0

# GATT regression tests based on the EDTTool
SIMULATION_ID="edtt_gatt"
VERBOSITY_LEVEL=2
PROCESS_IDS=""; EXIT_CODE=0
CWD="$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P)"

function Execute(){
  if [ ! -f $1 ]; then
    echo -e "  \e[91m`pwd`/`basename $1` cannot be found (did you forget to\
 compile it?)\e[39m"
    exit 1
  fi
  timeout 300 $@ & PROCESS_IDS="$PROCESS_IDS $!"
}

: "${BSIM_OUT_PATH:?BSIM_OUT_PATH must be defined}"
: "${EDTT_PATH:?EDTT_PATH must be defined}"

#Give a default value to BOARD if it does not have one yet:
BOARD="${BOARD:-nrf52_bsim}"

cd ${EDTT_PATH}

Execute ./src/edttool.py -s=${SIMULATION_ID} -d=0 --transport bsim \
  -T gatt_verification -C "${CWD}/gatt.test_list" -v=${VERBOSITY_LEVEL}

cd ${BSIM_OUT_PATH}/bin

Execute ./bs_device_EDTT_bridge -s=${SIMULATION_ID} -d=0 -AutoTerminate \
  -RxWait=2.5e3 -D=2 -dev0=1 -dev1=2 -v=${VERBOSITY_LEVEL}

Execute \
 ./bs_${BOARD}_tests_bluetooth_bsim_bt_edtt_ble_test_app_hci_test_app_prj_tst_llcp_conf\
  -s=${SIMULATION_ID} -d=1 -v=${VERBOSITY_LEVEL} -RealEncryption=1

Execute \
 ./bs_${BOARD}_tests_bluetooth_bsim_bt_edtt_ble_test_app_gatt_test_app_prj_llcp_conf\
  -s=${SIMULATION_ID} -d=2 -v=${VERBOSITY_LEVEL} -RealEncryption=1

Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
  -D=3 -sim_length=3600e6 $@

for PROCESS_ID in $PROCESS_IDS; do
  wait $PROCESS_ID || let "EXIT_CODE=$?"
done
exit $EXIT_CODE #the last exit code != 0