1#!/usr/bin/env bash
2# Copyright 2023 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5#set -x #uncomment this line for debugging
6set -ue
7
8: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}"
9
10source ${ZEPHYR_BASE}/tests/bsim/compile.source
11
12if [ "${BOARD_TS}" == "nrf5340bsim_nrf5340_cpuapp" ]; then
13  app=samples/bluetooth/bap_broadcast_source sysbuild=1 compile
14  app=tests/bsim/bluetooth/audio_samples/bap_broadcast_sink sysbuild=1 \
15    conf_file=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/prj.conf \
16    exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
17else
18  app=samples/bluetooth/bap_broadcast_source conf_overlay=overlay-bt_ll_sw_split.conf \
19    exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
20  app=tests/bsim/bluetooth/audio_samples/bap_broadcast_sink \
21    conf_file=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/prj.conf \
22    conf_overlay=${ZEPHYR_BASE}/samples/bluetooth/bap_broadcast_sink/overlay-bt_ll_sw_split.conf \
23    exe_name=bs_${BOARD_TS}_${app}_prj_conf sysbuild=1 compile
24fi
25
26wait_for_background_jobs
27