Skip to content

Commit 464435e

Browse files
aescolarMaureenHelm
authored andcommitted
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 <[email protected]>
1 parent 21f755d commit 464435e

File tree

6 files changed

+76
-5
lines changed

6 files changed

+76
-5
lines changed

.github/workflows/bsim-tests.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
EDTT_PATH: ../tools/edtt
4343
bsim_bt_52_test_results_file: ./bsim_bt/52_bsim_results.xml
4444
bsim_bt_53_test_results_file: ./bsim_bt/53_bsim_results.xml
45+
bsim_bt_53split_test_results_file: ./bsim_bt/53_bsim_split_results.xml
4546
bsim_net_52_test_results_file: ./bsim_net/52_bsim_results.xml
4647
steps:
4748
- name: Apply container owner mismatch workaround
@@ -134,15 +135,25 @@ jobs:
134135
if: steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
135136
run: |
136137
export ZEPHYR_BASE=${PWD}
137-
WORK_DIR=${ZEPHYR_BASE}/bsim_bt nice tests/bsim/bluetooth/compile.sh
138+
export WORK_DIR=${ZEPHYR_BASE}/bsim_bt
139+
# Build and run the BT tests for nrf52_bsim:
140+
nice tests/bsim/bluetooth/compile.sh
138141
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_52_test_results_file} \
139-
SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
140-
# Run the BT controller tests also for the nrf5340
142+
TESTS_FILE=tests/bsim/bluetooth/tests.nrf52bsim.txt tests/bsim/run_parallel.sh
143+
# Build and run the BT controller tests also for the nrf5340bsim_nrf5340_cpunet
141144
BOARD=nrf5340bsim_nrf5340_cpunet \
142-
WORK_DIR=${ZEPHYR_BASE}/bsim_bt nice tests/bsim/bluetooth/ll/compile.sh
145+
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh
143146
BOARD=nrf5340bsim_nrf5340_cpunet \
144147
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53_test_results_file} \
145-
SEARCH_PATH=tests/bsim/bluetooth/ll/ tests/bsim/run_parallel.sh
148+
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt \
149+
tests/bsim/run_parallel.sh
150+
# Build and run the nrf5340 split stack tests set
151+
BOARD=nrf5340bsim_nrf5340_cpuapp \
152+
nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh
153+
BOARD=nrf5340bsim_nrf5340_cpuapp \
154+
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53split_test_results_file} \
155+
TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpuapp.txt \
156+
tests/bsim/run_parallel.sh
146157
147158
- name: Run Networking Tests with BSIM
148159
if: steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
@@ -160,6 +171,7 @@ jobs:
160171
path: |
161172
./bsim_bt/52_bsim_results.xml
162173
./bsim_bt/53_bsim_results.xml
174+
./bsim_bt/53_bsim_split_results.xml
163175
./bsim_net/52_bsim_results.xml
164176
${{ github.event_path }}
165177
if-no-files-found: warn
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2018 Oticon A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Compile all bluetooth applications needed for the split stack tests
6+
7+
#set -x #uncomment this line for debugging
8+
set -ue
9+
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
10+
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
11+
directory}"
12+
13+
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
14+
15+
BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
16+
BOARD="${BOARD:-nrf5340bsim_nrf5340_cpuapp}"
17+
18+
mkdir -p ${WORK_DIR}
19+
20+
source ${ZEPHYR_BASE}/tests/bsim/compile.source
21+
22+
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_privacy.conf sysbuild=1 compile
23+
app=tests/bsim/bluetooth/ll/bis sysbuild=1 compile
24+
25+
wait_for_background_jobs
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2018 Oticon A/S
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Compile all the applications needed by the Bluetooth bsim tests on the nrf5340_cpunet
6+
7+
#set -x #uncomment this line for debugging
8+
set -ue
9+
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
10+
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
11+
directory}"
12+
13+
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
14+
15+
BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
16+
17+
mkdir -p ${WORK_DIR}
18+
19+
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
20+
21+
${ZEPHYR_BASE}/tests/bsim/bluetooth/ll/compile.sh
22+
23+
wait_for_background_jobs
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Search paths(s) for tests which will be run in the nrf52bsim
2+
# This file is used in CI to select which tests are run
3+
tests/bsim/bluetooth/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Search paths(s) for tests which will be run in the nrf5340 split stack configuration
2+
# This file is used in CI to select which tests are run
3+
tests/bsim/bluetooth/ll/conn/tests_scripts/basic_conn_encrypted_split_privacy.sh
4+
tests/bsim/bluetooth/ll/bis/tests_scripts/broadcast_iso.sh
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Search paths(s) for tests which will be run in the nrf5340 net core (both app, host and controller
2+
# built in the net core)
3+
# This file is used in CI to select which tests are run
4+
tests/bsim/bluetooth/ll/

0 commit comments

Comments
 (0)