1#!/usr/bin/env bash
2# Copyright 2023 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5# Compile all the applications needed by the bsim tests in these subfolders
6
7#set -x #uncomment this line for debugging
8set -ue
9
10: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
11: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root\
12 directory}"
13
14WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
15
16BOARD_ROOT="${BOARD_ROOT:-${ZEPHYR_BASE}}"
17
18mkdir -p ${WORK_DIR}
19
20source ${ZEPHYR_BASE}/tests/bsim/compile.source
21
22app=tests/bsim/bluetooth/host/adv/resume compile
23app=tests/bsim/bluetooth/host/adv/resume conf_file=prj_2.conf compile
24app=tests/bsim/bluetooth/host/adv/chain compile
25app=tests/bsim/bluetooth/host/adv/periodic compile
26app=tests/bsim/bluetooth/host/adv/periodic conf_file=prj_long_data.conf compile
27app=tests/bsim/bluetooth/host/adv/encrypted/css_sample_data compile
28app=tests/bsim/bluetooth/host/adv/encrypted/ead_sample compile
29
30app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_lowres.conf compile
31app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_collision.conf compile
32app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_multiple_conn.conf compile
33app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_autoconnect.conf compile
34app=tests/bsim/bluetooth/host/att/eatt_notif conf_file=prj.conf compile
35app=tests/bsim/bluetooth/host/att/mtu_update compile
36app=tests/bsim/bluetooth/host/att/read_fill_buf/client compile
37app=tests/bsim/bluetooth/host/att/read_fill_buf/server compile
38app=tests/bsim/bluetooth/host/att/sequential/dut compile
39app=tests/bsim/bluetooth/host/att/sequential/tester compile
40
41app=tests/bsim/bluetooth/host/gatt/caching compile
42app=tests/bsim/bluetooth/host/gatt/general compile
43app=tests/bsim/bluetooth/host/gatt/notify compile
44app=tests/bsim/bluetooth/host/gatt/notify_multiple compile
45app=tests/bsim/bluetooth/host/gatt/settings compile
46app=tests/bsim/bluetooth/host/gatt/settings conf_file=prj_2.conf compile
47app=tests/bsim/bluetooth/host/gatt/ccc_store compile
48app=tests/bsim/bluetooth/host/gatt/ccc_store conf_file=prj_2.conf compile
49app=tests/bsim/bluetooth/host/gatt/sc_indicate compile
50
51app=tests/bsim/bluetooth/host/iso/cis compile
52
53app=tests/bsim/bluetooth/host/l2cap/general compile
54app=tests/bsim/bluetooth/host/l2cap/userdata compile
55app=tests/bsim/bluetooth/host/l2cap/stress compile
56app=tests/bsim/bluetooth/host/l2cap/split/dut compile
57app=tests/bsim/bluetooth/host/l2cap/split/tester compile
58app=tests/bsim/bluetooth/host/l2cap/credits compile
59app=tests/bsim/bluetooth/host/l2cap/credits conf_file=prj_ecred.conf compile
60app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv compile
61app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv conf_file=prj_ecred.conf compile
62app=tests/bsim/bluetooth/host/l2cap/send_on_connect compile
63app=tests/bsim/bluetooth/host/l2cap/send_on_connect conf_file=prj_ecred.conf compile
64
65app=tests/bsim/bluetooth/host/misc/disable compile
66
67app=tests/bsim/bluetooth/host/privacy/central compile
68app=tests/bsim/bluetooth/host/privacy/peripheral compile
69app=tests/bsim/bluetooth/host/privacy/device compile
70app=tests/bsim/bluetooth/host/privacy/legacy compile
71
72app=tests/bsim/bluetooth/host/security/bond_overwrite_allowed compile
73app=tests/bsim/bluetooth/host/security/bond_overwrite_denied compile
74app=tests/bsim/bluetooth/host/security/bond_per_connection compile
75app=tests/bsim/bluetooth/host/security/ccc_update compile
76app=tests/bsim/bluetooth/host/security/ccc_update conf_file=prj_2.conf compile
77app=tests/bsim/bluetooth/host/security/id_addr_update/central compile
78app=tests/bsim/bluetooth/host/security/id_addr_update/peripheral compile
79app=tests/bsim/bluetooth/host/security/security_changed_callback compile
80
81app=tests/bsim/bluetooth/host/id/settings compile
82
83wait_for_background_jobs
84