From 40f0ea9f74c0b467e5dce1fa6973039630922d4d Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Tue, 21 Mar 2023 11:52:24 +0100 Subject: [PATCH] tests/bsim compile: Add support for multiple conf files And configuration files with paths, quotes, etc. Now it is possible to do, for example conf_file='myprj.conf;boards/board_name.conf' to provide both a project configuration and an overlay Signed-off-by: Alberto Escolar Piedras --- tests/bsim/compile.source | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/bsim/compile.source b/tests/bsim/compile.source index 1f8673c497..998265a48f 100644 --- a/tests/bsim/compile.source +++ b/tests/bsim/compile.source @@ -22,21 +22,16 @@ function _compile(){ local cc_flags="${cc_flags:-"-Werror"}" if [ "${conf_overlay}" ]; then - local exe_name="${exe_name:-bs_${BOARD}_${app}_${conf_file}_${conf_overlay}}" + local exe_basename="${exe_name:-bs_${BOARD}_${app}_${conf_file}_${conf_overlay}}" else - local exe_name="${exe_name:-bs_${BOARD}_${app}_${conf_file}}" + local exe_basename="${exe_name:-bs_${BOARD}_${app}_${conf_file}}" fi - local exe_name=${exe_name//\//_} - local exe_name=${exe_name//./_} - local exe_name=${BSIM_OUT_PATH}/bin/$exe_name + local exe_basename=$(echo ${exe_basename} | tr \"/\\.\; _ ) + local exe_name=${BSIM_OUT_PATH}/bin/$exe_basename local map_file_name=${exe_name}.Tsymbols - if [ "${conf_overlay}" ]; then - local this_dir=${WORK_DIR}/${app}/${conf_file}_${conf_overlay} - else - local this_dir=${WORK_DIR}/${app}/${conf_file} - fi + local this_dir=${WORK_DIR}/${app}/${exe_basename} local modules_arg="${ZEPHYR_MODULES:+-DZEPHYR_MODULES=${ZEPHYR_MODULES}}"