Skip to content

Commit 65808bb

Browse files
Thalleycarlescufi
authored andcommitted
tests: Bluetooth: Split CSIP tests to multiple scripts
Split the CSIP tests to multiple scripts to make them more specific and able to run in parallel. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 41fd5b8 commit 65808bb

File tree

4 files changed

+92
-58
lines changed

4 files changed

+92
-58
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2023 Nordic Semiconductor ASA
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
dir_path=$(dirname "$0")
8+
9+
$dir_path/csip.sh
10+
11+
$dir_path/csip_encrypted_sirk.sh
12+
13+
$dir_path/csip_forced_release.sh
Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright (c) 2020-2022 Nordic Semiconductor ASA
3+
# Copyright (c) 2020-2023 Nordic Semiconductor ASA
44
#
55
# SPDX-License-Identifier: Apache-2.0
66

@@ -14,9 +14,6 @@ EXECUTE_TIMEOUT=20
1414

1515
cd ${BSIM_OUT_PATH}/bin
1616

17-
# NORMAL TEST
18-
printf "\n\n======== Running normal test ========\n\n"
19-
2017
SIMULATION_ID="csip"
2118

2219
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
@@ -40,57 +37,3 @@ Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
4037
-D=4 -sim_length=60e6 $@
4138

4239
wait_for_background_jobs
43-
44-
# TEST WITH FORCE RELEASE
45-
46-
SIMULATION_ID="csip_forced_release"
47-
48-
printf "\n\n======== Running test with forced release of lock ========\n\n"
49-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
50-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
51-
-RealEncryption=1 -rs=1
52-
53-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
54-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member \
55-
-RealEncryption=1 -rs=2 -argstest rank 1
56-
57-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
58-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member \
59-
-RealEncryption=1 -rs=3 -argstest rank 2
60-
61-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
62-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_release \
63-
-RealEncryption=1 -rs=4 -argstest rank 3
64-
65-
# Simulation time should be larger than the WAIT_TIME in common.h
66-
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
67-
-D=4 -sim_length=60e6 $@
68-
69-
wait_for_background_jobs
70-
71-
# TEST WITH SIRK ENC
72-
73-
SIMULATION_ID="csip_sirk_encrypted"
74-
75-
printf "\n\n======== Running test with SIRK encrypted ========\n\n"
76-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
77-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
78-
-RealEncryption=1 -rs=1
79-
80-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
81-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member_enc \
82-
-RealEncryption=1 -rs=2 -argstest rank 1
83-
84-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
85-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member_enc \
86-
-RealEncryption=1 -rs=3 -argstest rank 2
87-
88-
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
89-
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_enc \
90-
-RealEncryption=1 -rs=4 -argstest rank 3
91-
92-
# Simulation time should be larger than the WAIT_TIME in common.h
93-
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
94-
-D=4 -sim_length=60e6 $@
95-
96-
wait_for_background_jobs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2023 Nordic Semiconductor ASA
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
# CSIP test where the SIRK is encrypted
8+
9+
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
10+
11+
VERBOSITY_LEVEL=2
12+
EXECUTE_TIMEOUT=20
13+
14+
cd ${BSIM_OUT_PATH}/bin
15+
16+
SIMULATION_ID="csip_sirk_encrypted"
17+
18+
printf "\n\n======== Running test with SIRK encrypted ========\n\n"
19+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
20+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
21+
-RealEncryption=1 -rs=1
22+
23+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
24+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member_enc \
25+
-RealEncryption=1 -rs=2 -argstest rank 1
26+
27+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
28+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member_enc \
29+
-RealEncryption=1 -rs=3 -argstest rank 2
30+
31+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
32+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_enc \
33+
-RealEncryption=1 -rs=4 -argstest rank 3
34+
35+
# Simulation time should be larger than the WAIT_TIME in common.h
36+
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
37+
-D=4 -sim_length=60e6 $@
38+
39+
wait_for_background_jobs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2023 Nordic Semiconductor ASA
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
# CSIP test where the Set Members releases the lock
8+
9+
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
10+
11+
VERBOSITY_LEVEL=2
12+
EXECUTE_TIMEOUT=20
13+
14+
cd ${BSIM_OUT_PATH}/bin
15+
16+
SIMULATION_ID="csip_forced_release"
17+
18+
printf "\n\n======== Running test with forced release of lock ========\n\n"
19+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
20+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
21+
-RealEncryption=1 -rs=1
22+
23+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
24+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member \
25+
-RealEncryption=1 -rs=2 -argstest rank 1
26+
27+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
28+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member \
29+
-RealEncryption=1 -rs=3 -argstest rank 2
30+
31+
Execute ./bs_${BOARD}_tests_bsim_bluetooth_audio_prj_conf \
32+
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_release \
33+
-RealEncryption=1 -rs=4 -argstest rank 3
34+
35+
# Simulation time should be larger than the WAIT_TIME in common.h
36+
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
37+
-D=4 -sim_length=60e6 $@
38+
39+
wait_for_background_jobs

0 commit comments

Comments
 (0)