Skip to content

Commit 9d74454

Browse files
committed
tests: bsim: support snippets
Support specifying a snippet when compiling bsim applications. Signed-off-by: Jordan Yates <[email protected]>
1 parent 69c1980 commit 9d74454

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/bsim/compile.source

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function _compile(){
2121
local conf_file="${conf_file:-prj.conf}"
2222
local extra_conf_file="${extra_conf_file:-""}"
2323
local conf_overlay="${conf_overlay:-""}"
24+
local snippet="${snippet:-""}"
2425

2526
default_cmake_args=(-DCONFIG_COVERAGE=y -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
2627
-DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y -DCONFIG_ASSERT=y)
@@ -60,6 +61,7 @@ function _compile(){
6061
orifs="$IFS"; IFS=
6162
local cmake_cmd+=( -DOVERLAY_CONFIG="${conf_overlay}" \
6263
-DEXTRA_CONF_FILE="${extra_conf_file}" \
64+
-DSNIPPET="${snippet}" \
6365
${modules_arg} \
6466
"${cmake_args[@]}" ${cc_flags:+-DCMAKE_C_FLAGS=${cc_flags}} "${cmake_extra_args[@]}")
6567
if [ -v sysbuild ]; then

0 commit comments

Comments
 (0)