twister: raise error for non-existing platform call
Changes will raise error and break program in following three situations: 1. Platform name pass in --platform option does not exist. 2. During using --all option, platform from platform_allow list does not exist. 3. During using --integration option, platform from integration_platforms list does not exist. Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
This commit is contained in:
parent
7c25fd3c2e
commit
483101fe36
3 changed files with 7 additions and 1 deletions
|
@ -3867,13 +3867,14 @@ class TestSuite(DisablePyTestCollectionMixin):
|
|||
"""
|
||||
Verify if platform name (passed by --platform option, or in yaml file
|
||||
as platform_allow or integration_platforms options) is correct. If not -
|
||||
log error.
|
||||
log and raise error.
|
||||
"""
|
||||
for platform in platform_names_to_verify:
|
||||
if platform in self.platform_names:
|
||||
break
|
||||
else:
|
||||
logger.error(f"{log_info} - unrecognized platform - {platform}")
|
||||
sys.exit(2)
|
||||
|
||||
|
||||
class CoverageTool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue