scripts: twister: Elevate status errors

Incorrect status assignments were previously just warnings in logs.
Now they are elevated to errors.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
Lukasz Mrugala 2024-08-09 13:14:42 +00:00 committed by Anas Nashif
parent f429b33d63
commit 306dba1d91
3 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ class Harness:
key = value.name if isinstance(value, Enum) else value
self._status = TwisterStatus[key]
except KeyError:
logger.warning(f'Harness assigned status "{value}"'
logger.error(f'Harness assigned status "{value}"'
f' without an equivalent in TwisterStatus.'
f' Assignment was ignored.')

View File

@ -105,7 +105,7 @@ class TestInstance:
key = value.name if isinstance(value, Enum) else value
self._status = TwisterStatus[key]
except KeyError:
logger.warning(f'TestInstance assigned status "{value}"'
logger.error(f'TestInstance assigned status "{value}"'
f' without an equivalent in TwisterStatus.'
f' Assignment was ignored.')

View File

@ -377,7 +377,7 @@ class TestCase(DisablePyTestCollectionMixin):
key = value.name if isinstance(value, Enum) else value
self._status = TwisterStatus[key]
except KeyError:
logger.warning(f'TestCase assigned status "{value}"'
logger.error(f'TestCase assigned status "{value}"'
f' without an equivalent in TwisterStatus.'
f' Assignment was ignored.')
@ -445,7 +445,7 @@ class TestSuite(DisablePyTestCollectionMixin):
key = value.name if isinstance(value, Enum) else value
self._status = TwisterStatus[key]
except KeyError:
logger.warning(f'TestSuite assigned status "{value}"'
logger.error(f'TestSuite assigned status "{value}"'
f' without an equivalent in TwisterStatus.'
f' Assignment was ignored.')