twister: Use proper warnings-to-errors command for sysbuild
If sysbuild is used a flag SB_CONFIG_COMPILER_WARNINGS_AS_ERRORS has to be used in order to turn warings to errors on all images. Align pytest tests with the change. Fixes: #67360 Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This commit is contained in:
parent
9f71b8023b
commit
5af2140927
|
@ -329,11 +329,15 @@ class CMake:
|
|||
warnings_as_errors = 'n'
|
||||
gen_defines_args = ""
|
||||
|
||||
warning_command = 'CONFIG_COMPILER_WARNINGS_AS_ERRORS'
|
||||
if self.testsuite.sysbuild:
|
||||
warning_command = 'SB_' + warning_command
|
||||
|
||||
logger.debug("Running cmake on %s for %s" % (self.source_dir, self.platform.name))
|
||||
cmake_args = [
|
||||
f'-B{self.build_dir}',
|
||||
f'-DTC_RUNID={self.instance.run_id}',
|
||||
f'-DCONFIG_COMPILER_WARNINGS_AS_ERRORS={warnings_as_errors}',
|
||||
f'-D{warning_command}={warnings_as_errors}',
|
||||
f'-DEXTRA_GEN_DEFINES_ARGS={gen_defines_args}',
|
||||
f'-G{self.env.generator}'
|
||||
]
|
||||
|
|
|
@ -368,7 +368,7 @@ TESTDATA_2_2 = [
|
|||
None, None,
|
||||
[os.path.join('dummy', 'cmake'),
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1',
|
||||
'-DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y',
|
||||
'-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=y',
|
||||
'-DEXTRA_GEN_DEFINES_ARGS=--edtlib-Werror', '-Gdummy_generator',
|
||||
'-S' + os.path.join('source', 'dir'),
|
||||
'arg1', 'arg2',
|
||||
|
@ -382,7 +382,7 @@ TESTDATA_2_2 = [
|
|||
'error', 'Cmake build failure',
|
||||
[os.path.join('dummy', 'cmake'),
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1',
|
||||
'-DCONFIG_COMPILER_WARNINGS_AS_ERRORS=n',
|
||||
'-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=n',
|
||||
'-DEXTRA_GEN_DEFINES_ARGS=', '-Gdummy_generator',
|
||||
'-Szephyr_base/share/sysbuild',
|
||||
'-DAPP_DIR=' + os.path.join('source', 'dir'),
|
||||
|
|
Loading…
Reference in a new issue