Bluetooth: bsim: deduplicate compile scripts

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>
This commit is contained in:
Aleksander Wasaznik 2024-08-12 12:53:40 +02:00 committed by Anas Nashif
commit 8b4907ee97
37 changed files with 33 additions and 48 deletions

View file

@ -16,8 +16,8 @@ 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/periodic conf_file=prj_coded.conf compile
app=tests/bsim/bluetooth/host/adv/encrypted/css_sample_data compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/compile.sh
app=tests/bsim/bluetooth/host/adv/encrypted/ead_sample compile
app=tests/bsim/bluetooth/host/adv/long_ad compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/adv/long_ad/compile.sh
wait_for_background_jobs

View file

@ -15,18 +15,12 @@ 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/dut \
conf_file='prj.conf;rx_tx_prio_invert.extra.conf' 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
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/mtu_update/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/read_fill_buf/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/retry_on_sec_err/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/sequential/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/pipeline/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/long_read/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/att/open_close/compile.sh
wait_for_background_jobs

View file

@ -23,23 +23,19 @@ app=tests/bsim/bluetooth/host/iso/bis compile
app=tests/bsim/bluetooth/host/iso/frag 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
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/disconnect/compile.sh
app=tests/bsim/bluetooth/host/misc/conn_stress/central compile
app=tests/bsim/bluetooth/host/misc/conn_stress/peripheral compile
app=tests/bsim/bluetooth/host/misc/hfc compile
app=tests/bsim/bluetooth/host/misc/hfc_multilink/dut compile
app=tests/bsim/bluetooth/host/misc/hfc_multilink/tester compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/hfc/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/hfc_multilink/compile.sh
app=tests/bsim/bluetooth/host/misc/unregister_conn_cb compile
app=tests/bsim/bluetooth/host/misc/sample_test compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/misc/sample_test/compile.sh
app=tests/bsim/bluetooth/host/privacy/central compile
app=tests/bsim/bluetooth/host/privacy/peripheral compile
app=tests/bsim/bluetooth/host/privacy/peripheral conf_file=prj_rpa_expired.conf compile
app=tests/bsim/bluetooth/host/privacy/peripheral conf_file=prj_rpa_sharing.conf compile
app=tests/bsim/bluetooth/host/privacy/device compile
app=tests/bsim/bluetooth/host/privacy/legacy compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/central/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/peripheral/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/device/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/privacy/legacy/compile.sh
app=tests/bsim/bluetooth/host/id/settings compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/id/settings/compile.sh
wait_for_background_jobs

View file

@ -16,10 +16,8 @@ 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
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
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

View file

@ -11,19 +11,16 @@ set -ue
source ${ZEPHYR_BASE}/tests/bsim/compile.source
app=tests/bsim/bluetooth/host/l2cap/many_conns compile
app=tests/bsim/bluetooth/host/l2cap/multilink_peripheral compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/compile.sh
app=tests/bsim/bluetooth/host/l2cap/general compile
app=tests/bsim/bluetooth/host/l2cap/userdata compile
app=tests/bsim/bluetooth/host/l2cap/userdata conf_file=prj_no_checks.conf compile
app=tests/bsim/bluetooth/host/l2cap/stress compile
app=tests/bsim/bluetooth/host/l2cap/stress conf_file=prj_nofrag.conf compile
app=tests/bsim/bluetooth/host/l2cap/stress conf_file=prj_syswq.conf 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/reassembly/dut compile
app=tests/bsim/bluetooth/host/l2cap/reassembly/peer compile
app=tests/bsim/bluetooth/host/l2cap/ecred/dut compile
app=tests/bsim/bluetooth/host/l2cap/ecred/peer compile
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/split/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/reassembly/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/l2cap/ecred/compile.sh
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

View file

@ -10,13 +10,13 @@ set -ue
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
run_in_background \
${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_overwrite_denied/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/bond_per_connection/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/ccc_update/compile.sh
run_in_background ${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/id_addr_update/compile.sh
run_in_background \
${ZEPHYR_BASE}/tests/bsim/bluetooth/host/security/security_changed_callback/compile.sh
wait_for_background_jobs