scripts: Fix twisterlib for ruff - SIM102
This fixes ruff linting error SIM102, where multiple ifs were used instead of combining them with and or similar operators. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
parent
c0553343c4
commit
dad7a8e17e
7 changed files with 40 additions and 46 deletions
|
@ -769,14 +769,16 @@ class FilterBuilder(CMake):
|
|||
filter_data.update(self.defconfig)
|
||||
filter_data.update(self.cmake_cache)
|
||||
|
||||
if self.instance.sysbuild and self.env.options.device_testing:
|
||||
# Verify that twister's arguments support sysbuild.
|
||||
# Twister sysbuild flashing currently only works with west, so
|
||||
# --west-flash must be passed.
|
||||
if self.env.options.west_flash is None:
|
||||
logger.warning("Sysbuild test will be skipped. " +
|
||||
"West must be used for flashing.")
|
||||
return {os.path.join(self.platform.name, self.testsuite.name): True}
|
||||
# Verify that twister's arguments support sysbuild.
|
||||
# Twister sysbuild flashing currently only works with west,
|
||||
# so --west-flash must be passed.
|
||||
if (
|
||||
self.instance.sysbuild
|
||||
and self.env.options.device_testing
|
||||
and self.env.options.west_flash is None
|
||||
):
|
||||
logger.warning("Sysbuild test will be skipped. West must be used for flashing.")
|
||||
return {os.path.join(self.platform.name, self.testsuite.name): True}
|
||||
|
||||
if self.testsuite and self.testsuite.filter:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue