Some tests have a compile script for that test alone, named `_compile.sh` or `_build.sh`. These scripts are useful for developers to avoid compiling the world. But these scripts were not run in the CI. These scripts were previously not suitable for running in the CI because would put the artefact in the source directory, but this is no longer the case, and the CI could run these scripts now. This commit renames any `<test>/test_scripts/_compile.sh` and `<test>/test_scripts/_build.sh` to `<test>/compile.sh`. The test runner in CI will ignores any file named `compile.sh`, so there is no need for a underscore prefix. This fits into and extends the hierarchical structure of `compile.sh` chain that starts at `:/test/bsim/compile.sh`, the CI build script tree. The newly moved scripts now become a part of the build script tree, called from a `compile.sh` where a duplicate set of build commands was before. The sub scripts use `run_in_background` to preserve the parallelism as it was before this change. This removes an error-prone duplication and makes the CI test all the build scripts. Tests that did not have any compile script are not given one for now. Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
23 lines
992 B
Bash
Executable file
23 lines
992 B
Bash
Executable file
#!/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
|
|
: "${ZEPHYR_BASE:?ZEPHYR_BASE must be set to point to the zephyr root directory}"
|
|
|
|
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/caching conf_overlay=psa_overlay.conf 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
|
|
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/settings/compile.sh
|
|
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/ccc_store/compile.sh
|
|
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/gatt/sc_indicate/compile.sh
|
|
|
|
wait_for_background_jobs
|