From 65d49cd4345208d23bdd8a8af89d4c5d8fec7203 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Wed, 17 Jan 2024 09:51:37 +0100 Subject: [PATCH] tests/bsim/bt/host: Split build script in 6 There are quite many BT host test images being built. Today these are all built in parallel, causing a quite high load. Let's split them in their separate sub-scripts, so we don't parallelize too many builds, and users have more granularity if they only want to build a subset. Signed-off-by: Alberto Escolar Piedras --- tests/bsim/bluetooth/host/adv/compile.sh | 32 ++++++++++ tests/bsim/bluetooth/host/att/compile.sh | 39 +++++++++++ tests/bsim/bluetooth/host/compile.sh | 64 ++----------------- tests/bsim/bluetooth/host/gatt/compile.sh | 33 ++++++++++ tests/bsim/bluetooth/host/l2cap/compile.sh | 35 ++++++++++ tests/bsim/bluetooth/host/security/compile.sh | 31 +++++++++ 6 files changed, 175 insertions(+), 59 deletions(-) create mode 100755 tests/bsim/bluetooth/host/adv/compile.sh create mode 100755 tests/bsim/bluetooth/host/att/compile.sh create mode 100755 tests/bsim/bluetooth/host/gatt/compile.sh create mode 100755 tests/bsim/bluetooth/host/l2cap/compile.sh create mode 100755 tests/bsim/bluetooth/host/security/compile.sh diff --git a/tests/bsim/bluetooth/host/adv/compile.sh b/tests/bsim/bluetooth/host/adv/compile.sh new file mode 100755 index 00000000000..026b436f0cd --- /dev/null +++ b/tests/bsim/bluetooth/host/adv/compile.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Copyright 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Compile all the applications needed by the bsim tests in these subfolders + +#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/compile.source + +app=tests/bsim/bluetooth/host/adv/resume compile +app=tests/bsim/bluetooth/host/adv/resume conf_file=prj_2.conf compile +app=tests/bsim/bluetooth/host/adv/chain compile +app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_advertiser.conf compile +app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_scanner.conf compile +app=tests/bsim/bluetooth/host/adv/periodic compile +app=tests/bsim/bluetooth/host/adv/periodic conf_file=prj_long_data.conf compile +app=tests/bsim/bluetooth/host/adv/encrypted/css_sample_data compile +app=tests/bsim/bluetooth/host/adv/encrypted/ead_sample compile + +wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/att/compile.sh b/tests/bsim/bluetooth/host/att/compile.sh new file mode 100755 index 00000000000..8361a9e8644 --- /dev/null +++ b/tests/bsim/bluetooth/host/att/compile.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Copyright 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Compile all the applications needed by the bsim tests in these subfolders + +#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/compile.source + +app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_lowres.conf compile +app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_collision.conf compile +app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_multiple_conn.conf compile +app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_autoconnect.conf compile +app=tests/bsim/bluetooth/host/att/eatt_notif conf_file=prj.conf compile +app=tests/bsim/bluetooth/host/att/mtu_update compile +app=tests/bsim/bluetooth/host/att/read_fill_buf/client compile +app=tests/bsim/bluetooth/host/att/read_fill_buf/server compile +app=tests/bsim/bluetooth/host/att/retry_on_sec_err/client compile +app=tests/bsim/bluetooth/host/att/retry_on_sec_err/server compile +app=tests/bsim/bluetooth/host/att/sequential/dut compile +app=tests/bsim/bluetooth/host/att/sequential/tester compile +app=tests/bsim/bluetooth/host/att/pipeline/dut compile +app=tests/bsim/bluetooth/host/att/pipeline/tester compile +app=tests/bsim/bluetooth/host/att/long_read compile +app=tests/bsim/bluetooth/host/att/open_close compile + +wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/compile.sh b/tests/bsim/bluetooth/host/compile.sh index 44243e6ecc0..05de7ceb0fb 100755 --- a/tests/bsim/bluetooth/host/compile.sh +++ b/tests/bsim/bluetooth/host/compile.sh @@ -19,59 +19,14 @@ mkdir -p ${WORK_DIR} source ${ZEPHYR_BASE}/tests/bsim/compile.source -app=tests/bsim/bluetooth/host/adv/resume compile -app=tests/bsim/bluetooth/host/adv/resume conf_file=prj_2.conf compile -app=tests/bsim/bluetooth/host/adv/chain compile -app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_advertiser.conf compile -app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_scanner.conf compile -app=tests/bsim/bluetooth/host/adv/periodic compile -app=tests/bsim/bluetooth/host/adv/periodic conf_file=prj_long_data.conf compile -app=tests/bsim/bluetooth/host/adv/encrypted/css_sample_data compile -app=tests/bsim/bluetooth/host/adv/encrypted/ead_sample compile - -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_lowres.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_collision.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_multiple_conn.conf compile -app=tests/bsim/bluetooth/host/att/eatt conf_file=prj_autoconnect.conf compile -app=tests/bsim/bluetooth/host/att/eatt_notif conf_file=prj.conf compile -app=tests/bsim/bluetooth/host/att/mtu_update compile -app=tests/bsim/bluetooth/host/att/read_fill_buf/client compile -app=tests/bsim/bluetooth/host/att/read_fill_buf/server compile -app=tests/bsim/bluetooth/host/att/retry_on_sec_err/client compile -app=tests/bsim/bluetooth/host/att/retry_on_sec_err/server compile -app=tests/bsim/bluetooth/host/att/sequential/dut compile -app=tests/bsim/bluetooth/host/att/sequential/tester compile -app=tests/bsim/bluetooth/host/att/pipeline/dut compile -app=tests/bsim/bluetooth/host/att/pipeline/tester compile -app=tests/bsim/bluetooth/host/att/long_read compile -app=tests/bsim/bluetooth/host/att/open_close compile - -app=tests/bsim/bluetooth/host/gatt/authorization compile -app=tests/bsim/bluetooth/host/gatt/caching compile -app=tests/bsim/bluetooth/host/gatt/general compile -app=tests/bsim/bluetooth/host/gatt/notify compile -app=tests/bsim/bluetooth/host/gatt/notify_multiple compile -app=tests/bsim/bluetooth/host/gatt/settings compile -app=tests/bsim/bluetooth/host/gatt/settings conf_file=prj_2.conf compile -app=tests/bsim/bluetooth/host/gatt/ccc_store compile -app=tests/bsim/bluetooth/host/gatt/ccc_store conf_file=prj_2.conf compile -app=tests/bsim/bluetooth/host/gatt/sc_indicate compile +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/compile.sh +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/compile.sh +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/compile.sh +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/compile.sh +${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/compile.sh app=tests/bsim/bluetooth/host/iso/cis compile -app=tests/bsim/bluetooth/host/l2cap/general compile -app=tests/bsim/bluetooth/host/l2cap/userdata compile -app=tests/bsim/bluetooth/host/l2cap/stress compile -app=tests/bsim/bluetooth/host/l2cap/split/dut compile -app=tests/bsim/bluetooth/host/l2cap/split/tester compile -app=tests/bsim/bluetooth/host/l2cap/credits compile -app=tests/bsim/bluetooth/host/l2cap/credits conf_file=prj_ecred.conf compile -app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv compile -app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv conf_file=prj_ecred.conf compile -app=tests/bsim/bluetooth/host/l2cap/frags compile -app=tests/bsim/bluetooth/host/l2cap/send_on_connect compile -app=tests/bsim/bluetooth/host/l2cap/send_on_connect conf_file=prj_ecred.conf compile - app=tests/bsim/bluetooth/host/misc/disable compile app=tests/bsim/bluetooth/host/misc/disconnect/dut compile app=tests/bsim/bluetooth/host/misc/disconnect/tester compile @@ -85,15 +40,6 @@ app=tests/bsim/bluetooth/host/privacy/peripheral conf_file=prj_rpa_sharing.conf app=tests/bsim/bluetooth/host/privacy/device compile app=tests/bsim/bluetooth/host/privacy/legacy compile -app=tests/bsim/bluetooth/host/security/bond_overwrite_allowed compile -app=tests/bsim/bluetooth/host/security/bond_overwrite_denied compile -app=tests/bsim/bluetooth/host/security/bond_per_connection compile -app=tests/bsim/bluetooth/host/security/ccc_update compile -app=tests/bsim/bluetooth/host/security/ccc_update conf_file=prj_2.conf compile -app=tests/bsim/bluetooth/host/security/id_addr_update/central compile -app=tests/bsim/bluetooth/host/security/id_addr_update/peripheral compile -app=tests/bsim/bluetooth/host/security/security_changed_callback compile - app=tests/bsim/bluetooth/host/id/settings compile wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/gatt/compile.sh b/tests/bsim/bluetooth/host/gatt/compile.sh new file mode 100755 index 00000000000..21ca39f3d99 --- /dev/null +++ b/tests/bsim/bluetooth/host/gatt/compile.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Copyright 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Compile all the applications needed by the bsim tests in these subfolders + +#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/compile.source + +app=tests/bsim/bluetooth/host/gatt/authorization compile +app=tests/bsim/bluetooth/host/gatt/caching compile +app=tests/bsim/bluetooth/host/gatt/general compile +app=tests/bsim/bluetooth/host/gatt/notify compile +app=tests/bsim/bluetooth/host/gatt/notify_multiple compile +app=tests/bsim/bluetooth/host/gatt/settings compile +app=tests/bsim/bluetooth/host/gatt/settings conf_file=prj_2.conf compile +app=tests/bsim/bluetooth/host/gatt/ccc_store compile +app=tests/bsim/bluetooth/host/gatt/ccc_store conf_file=prj_2.conf compile +app=tests/bsim/bluetooth/host/gatt/sc_indicate compile + +wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/l2cap/compile.sh b/tests/bsim/bluetooth/host/l2cap/compile.sh new file mode 100755 index 00000000000..a4dd31c4b66 --- /dev/null +++ b/tests/bsim/bluetooth/host/l2cap/compile.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Copyright 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Compile all the applications needed by the bsim tests in these subfolders + +#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/compile.source + +app=tests/bsim/bluetooth/host/l2cap/general compile +app=tests/bsim/bluetooth/host/l2cap/userdata compile +app=tests/bsim/bluetooth/host/l2cap/stress compile +app=tests/bsim/bluetooth/host/l2cap/split/dut compile +app=tests/bsim/bluetooth/host/l2cap/split/tester compile +app=tests/bsim/bluetooth/host/l2cap/credits compile +app=tests/bsim/bluetooth/host/l2cap/credits conf_file=prj_ecred.conf compile +app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv compile +app=tests/bsim/bluetooth/host/l2cap/credits_seg_recv conf_file=prj_ecred.conf compile +app=tests/bsim/bluetooth/host/l2cap/frags compile +app=tests/bsim/bluetooth/host/l2cap/send_on_connect compile +app=tests/bsim/bluetooth/host/l2cap/send_on_connect conf_file=prj_ecred.conf compile + +wait_for_background_jobs diff --git a/tests/bsim/bluetooth/host/security/compile.sh b/tests/bsim/bluetooth/host/security/compile.sh new file mode 100755 index 00000000000..4930a817616 --- /dev/null +++ b/tests/bsim/bluetooth/host/security/compile.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Copyright 2023 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +# Compile all the applications needed by the bsim tests in these subfolders + +#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/compile.source + +app=tests/bsim/bluetooth/host/security/bond_overwrite_allowed compile +app=tests/bsim/bluetooth/host/security/bond_overwrite_denied compile +app=tests/bsim/bluetooth/host/security/bond_per_connection compile +app=tests/bsim/bluetooth/host/security/ccc_update compile +app=tests/bsim/bluetooth/host/security/ccc_update conf_file=prj_2.conf compile +app=tests/bsim/bluetooth/host/security/id_addr_update/central compile +app=tests/bsim/bluetooth/host/security/id_addr_update/peripheral compile +app=tests/bsim/bluetooth/host/security/security_changed_callback compile + +wait_for_background_jobs