scripts: pylib: twister: Pass testsuite name to cmake
Add a CMake argument with the current testsuite name. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
d2fb07785d
commit
d2bae91803
2 changed files with 4 additions and 2 deletions
|
|
@ -343,6 +343,7 @@ class CMake:
|
|||
cmake_args = [
|
||||
f'-B{self.build_dir}',
|
||||
f'-DTC_RUNID={self.instance.run_id}',
|
||||
f'-DTC_NAME={self.instance.testsuite.name}',
|
||||
f'-D{warning_command}={warnings_as_errors}',
|
||||
f'-DEXTRA_GEN_DEFINES_ARGS={gen_defines_args}',
|
||||
f'-G{self.env.generator}'
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ TESTDATA_2_2 = [
|
|||
True, True, False,
|
||||
TwisterStatus.NONE, None,
|
||||
[os.path.join('dummy', 'cmake'),
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1',
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1', '-DTC_NAME=testcase',
|
||||
'-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=y',
|
||||
'-DEXTRA_GEN_DEFINES_ARGS=--edtlib-Werror', '-Gdummy_generator',
|
||||
'-S' + os.path.join('source', 'dir'),
|
||||
|
|
@ -383,7 +383,7 @@ TESTDATA_2_2 = [
|
|||
True, False, True,
|
||||
TwisterStatus.ERROR, 'Cmake build failure',
|
||||
[os.path.join('dummy', 'cmake'),
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1',
|
||||
'-B' + os.path.join('build', 'dir'), '-DTC_RUNID=1', '-DTC_NAME=testcase',
|
||||
'-DSB_CONFIG_COMPILER_WARNINGS_AS_ERRORS=n',
|
||||
'-DEXTRA_GEN_DEFINES_ARGS=', '-Gdummy_generator',
|
||||
'-Szephyr_base/share/sysbuild',
|
||||
|
|
@ -442,6 +442,7 @@ def test_cmake_run_cmake(
|
|||
instance_mock.status = TwisterStatus.NONE
|
||||
instance_mock.reason = None
|
||||
instance_mock.testsuite = mock.Mock()
|
||||
instance_mock.testsuite.name = 'testcase'
|
||||
instance_mock.testsuite.required_snippets = ['dummy snippet 1', 'ds2']
|
||||
instance_mock.testcases = [mock.Mock(), mock.Mock()]
|
||||
instance_mock.testcases[0].status = TwisterStatus.NONE
|
||||
|
|
|
|||
Loading…
Reference in a new issue