test-framework: Fail the test if something broke in prepare
Signed-off-by: Kamil Gierszewski <kamil.gierszewski@huawei.com>
This commit is contained in:
parent
0edba4f01b
commit
6ea1c16066
@ -186,8 +186,6 @@ TestRun.setup = __setup
|
||||
|
||||
@classmethod
|
||||
def __makereport(cls, item, call, res):
|
||||
if cls.LOGGER is None:
|
||||
return None
|
||||
cls.outcome = res.outcome
|
||||
step_info = {
|
||||
'result': res.outcome,
|
||||
@ -213,7 +211,7 @@ def __makereport(cls, item, call, res):
|
||||
if res.outcome == "skipped":
|
||||
cls.LOGGER.skip("Test skipped.")
|
||||
|
||||
if res.when == "call" and cls.LOGGER.get_result() == BaseLogResult.FAILED:
|
||||
if res.when in ["call", "setup"] and cls.LOGGER.get_result() >= BaseLogResult.FAILED:
|
||||
res.outcome = "failed"
|
||||
# To print additional message in final test report, assign it to res.longrepr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user