From 4e7feddd871cdce30ab11d6d4d4584bb42c6574a Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sat, 2 Nov 2024 10:56:02 +1000 Subject: [PATCH] tests: bsim: support snippets Support specifying a snippet when compiling bsim applications. Signed-off-by: Jordan Yates --- tests/bsim/compile.source | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/bsim/compile.source b/tests/bsim/compile.source index bbf0b8d3b1c..c6565714b28 100644 --- a/tests/bsim/compile.source +++ b/tests/bsim/compile.source @@ -21,6 +21,7 @@ function _compile(){ local conf_file="${conf_file:-prj.conf}" local extra_conf_file="${extra_conf_file:-""}" local conf_overlay="${conf_overlay:-""}" + local snippet="${snippet:-""}" default_cmake_args=(-DCONFIG_COVERAGE=y -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y -DCONFIG_ASSERT=y) @@ -60,6 +61,7 @@ function _compile(){ orifs="$IFS"; IFS= local cmake_cmd+=( -DOVERLAY_CONFIG="${conf_overlay}" \ -DEXTRA_CONF_FILE="${extra_conf_file}" \ + -DSNIPPET="${snippet}" \ ${modules_arg} \ "${cmake_args[@]}" ${cc_flags:+-DCMAKE_C_FLAGS=${cc_flags}} "${cmake_extra_args[@]}") if [ -v sysbuild ]; then