Various different Statuses were joined into a single class, TwisterStatus. This change anticipates further streamlining of the Twister's approach to Status. Code guarding Twister's Properties was shortened to a value check only. QEMUOutputStatus was left separate, as doubts were cast whether it should remain a status. Leaving it separate makes its removal easier. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
29 lines
698 B
Python
29 lines
698 B
Python
#!/usr/bin/env python3
|
|
# Copyright (c) 2024 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
"""
|
|
Status classes to be used instead of str statuses.
|
|
"""
|
|
|
|
from enum import Enum
|
|
|
|
|
|
class TwisterStatus(str, Enum):
|
|
def __str__(self):
|
|
return str(self.value)
|
|
|
|
# All statuses below this comment can be used for TestCase
|
|
BLOCK = 'blocked'
|
|
STARTED = 'started'
|
|
|
|
# All statuses below this comment can be used for TestSuite
|
|
# All statuses below this comment can be used for TestInstance
|
|
FILTER = 'filtered'
|
|
|
|
# All statuses below this comment can be used for Harness
|
|
NONE = None
|
|
ERROR = 'error'
|
|
FAIL = 'failed'
|
|
PASS = 'passed'
|
|
SKIP = 'skipped'
|