tests/bsim/compile.source: Provide common check and default

Provide a common check for BSIM_COMPONENTS_PATH
and a default WORK_DIR
So we avoid boilerplate in other scripts

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2024-03-21 15:07:17 +01:00 committed by Alberto Escolar
commit 13e31b2736

View file

@ -3,6 +3,10 @@
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
: "${BSIM_COMPONENTS_PATH:?BSIM_COMPONENTS_PATH must be defined}"
WORK_DIR="${WORK_DIR:-${ZEPHYR_BASE}/bsim_out}"
function print_error_info(){ function print_error_info(){
echo -e "\033[0;31mFailure building ${app} ${conf_file} for ${BOARD}\033[0m\n\ echo -e "\033[0;31mFailure building ${app} ${conf_file} for ${BOARD}\033[0m\n\
You can rebuild it with\n\ You can rebuild it with\n\