Status errors previously logged an error, but didn't fail the running test. This commit changes that and introduces a new StatusAttributeError to use there. One test is modified so it follows proper status form. One test for the new error has been added. Status errors now will properly mark the Instance as ERROR and not run TestCases as SKIP. This necessitated some code layout changes in runner.py Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
30 lines
692 B
Python
30 lines
692 B
Python
# vim: set syntax=python ts=4 :
|
|
#
|
|
# Copyright (c) 2018-2022 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
class TwisterException(Exception):
|
|
pass
|
|
|
|
|
|
class TwisterRuntimeError(TwisterException):
|
|
pass
|
|
|
|
|
|
class ConfigurationError(TwisterException):
|
|
def __init__(self, cfile, message):
|
|
TwisterException.__init__(self, str(cfile) + ": " + message)
|
|
|
|
|
|
class BuildError(TwisterException):
|
|
pass
|
|
|
|
|
|
class ExecutionError(TwisterException):
|
|
pass
|
|
|
|
|
|
class StatusAttributeError(TwisterException):
|
|
def __init__(self, cls : type, value):
|
|
msg = f'{cls.__name__} assigned status {value}, which could not be cast to a TwisterStatus.'
|
|
super().__init__(msg)
|