CI bsim workflow: Also run some split BT stack tests

Also run some split BT stack tests on the nrf5340 platform
to test this configuration.

Move the selection of which BT tests are built and run
in each platform to files in the tests/bsim/ folder.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-10-26 16:28:25 +02:00 committed by Maureen Helm
parent 21f755d651
commit 464435e22b
6 changed files with 76 additions and 5 deletions

View File

@ -42,6 +42,7 @@ jobs:
EDTT_PATH: ../tools/edtt
bsim_bt_52_test_results_file: ./bsim_bt/52_bsim_results.xml
bsim_bt_53_test_results_file: ./bsim_bt/53_bsim_results.xml
bsim_bt_53split_test_results_file: ./bsim_bt/53_bsim_split_results.xml
bsim_net_52_test_results_file: ./bsim_net/52_bsim_results.xml
steps:
- name: Apply container owner mismatch workaround
@ -134,15 +135,25 @@ jobs:
if: steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
export ZEPHYR_BASE=${PWD}
WORK_DIR=${ZEPHYR_BASE}/bsim_bt nice tests/bsim/bluetooth/compile.sh
export WORK_DIR=${ZEPHYR_BASE}/bsim_bt
# Build and run the BT tests for nrf52_bsim:
nice tests/bsim/bluetooth/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_52_test_results_file} \
SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
# Run the BT controller tests also for the nrf5340
TESTS_FILE=tests/bsim/bluetooth/tests.nrf52bsim.txt tests/bsim/run_parallel.sh
# Build and run the BT controller tests also for the nrf5340bsim_nrf5340_cpunet
BOARD=nrf5340bsim_nrf5340_cpunet \
WORK_DIR=${ZEPHYR_BASE}/bsim_bt nice tests/bsim/bluetooth/ll/compile.sh
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh
BOARD=nrf5340bsim_nrf5340_cpunet \
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53_test_results_file} \
SEARCH_PATH=tests/bsim/bluetooth/ll/ tests/bsim/run_parallel.sh
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt \
tests/bsim/run_parallel.sh
# Build and run the nrf5340 split stack tests set
BOARD=nrf5340bsim_nrf5340_cpuapp \
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh
BOARD=nrf5340bsim_nrf5340_cpuapp \
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53split_test_results_file} \
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpuapp.txt \
tests/bsim/run_parallel.sh
- name: Run Networking Tests with BSIM
if: steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
@ -160,6 +171,7 @@ jobs:
path: |
./bsim_bt/52_bsim_results.xml
./bsim_bt/53_bsim_results.xml
./bsim_bt/53_bsim_split_results.xml
./bsim_net/52_bsim_results.xml
${{ github.event_path }}
if-no-files-found: warn

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright 2018 Oticon A/S
# SPDX-License-Identifier: Apache-2.0
# Compile all bluetooth applications needed for the split stack tests
#set -x #uncomment this line for debugging
set -ue
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
directory}"
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
BOARD="${BOARD:-nrf5340bsim_nrf5340_cpuapp}"
mkdir -p ${WORK_DIR}
source ${ZEPHYR_BASE}/tests/bsim/compile.source
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_privacy.conf sysbuild=1 compile
app=tests/bsim/bluetooth/ll/bis sysbuild=1 compile
wait_for_background_jobs

View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Copyright 2018 Oticon A/S
# SPDX-License-Identifier: Apache-2.0
# Compile all the applications needed by the Bluetooth bsim tests on the nrf5340_cpunet
#set -x #uncomment this line for debugging
set -ue
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
directory}"
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
mkdir -p ${WORK_DIR}
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh
wait_for_background_jobs

View File

@ -0,0 +1,3 @@
# Search paths(s) for tests which will be run in the nrf52bsim
# This file is used in CI to select which tests are run
tests/bsim/bluetooth/

View File

@ -0,0 +1,4 @@
# Search paths(s) for tests which will be run in the nrf5340 split stack configuration
# This file is used in CI to select which tests are run
tests/bsim/bluetooth/ll/conn/tests_scripts/basic_conn_encrypted_split_privacy.sh
tests/bsim/bluetooth/ll/bis/tests_scripts/broadcast_iso.sh

View File

@ -0,0 +1,4 @@
# Search paths(s) for tests which will be run in the nrf5340 net core (both app, host and controller
# built in the net core)
# This file is used in CI to select which tests are run
tests/bsim/bluetooth/ll/