scripts: twister: Remove unused statuses
TestInstanceStatus of TIMEOUT and FLASH were never really used. They were checked for, but never assigned. Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This commit is contained in:
parent
5c6c44a247
commit
6f452e81f7
3 changed files with 4 additions and 15 deletions
|
|
@ -1019,7 +1019,7 @@ class ProjectBuilder(FilterBuilder):
|
||||||
else:
|
else:
|
||||||
more_info = "build"
|
more_info = "build"
|
||||||
|
|
||||||
if ( instance.status in [TestInstanceStatus.ERROR, TestInstanceStatus.FAIL, TestInstanceStatus.TIMEOUT, TestInstanceStatus.FLASH]
|
if ( instance.status in [TestInstanceStatus.ERROR, TestInstanceStatus.FAIL]
|
||||||
and hasattr(self.instance.handler, 'seed')
|
and hasattr(self.instance.handler, 'seed')
|
||||||
and self.instance.handler.seed is not None ):
|
and self.instance.handler.seed is not None ):
|
||||||
more_info += "/seed: " + str(self.options.seed)
|
more_info += "/seed: " + str(self.options.seed)
|
||||||
|
|
@ -1027,7 +1027,7 @@ class ProjectBuilder(FilterBuilder):
|
||||||
results.done, total_tests_width, total_to_do , instance.platform.name,
|
results.done, total_tests_width, total_to_do , instance.platform.name,
|
||||||
instance.testsuite.name, status, more_info))
|
instance.testsuite.name, status, more_info))
|
||||||
|
|
||||||
if instance.status in [TestInstanceStatus.ERROR, TestInstanceStatus.FAIL, TestInstanceStatus.TIMEOUT]:
|
if instance.status in [TestInstanceStatus.ERROR, TestInstanceStatus.FAIL]:
|
||||||
self.log_info_file(self.options.inline_logs)
|
self.log_info_file(self.options.inline_logs)
|
||||||
else:
|
else:
|
||||||
completed_perc = 0
|
completed_perc = 0
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,8 @@ class TestInstanceStatus(str, Enum):
|
||||||
ERROR = 'error'
|
ERROR = 'error'
|
||||||
FAIL = 'failed'
|
FAIL = 'failed'
|
||||||
FILTER = 'filtered'
|
FILTER = 'filtered'
|
||||||
FLASH = 'flash_error'
|
|
||||||
PASS = 'passed'
|
PASS = 'passed'
|
||||||
SKIP = 'skipped'
|
SKIP = 'skipped'
|
||||||
TIMEOUT = 'timeout'
|
|
||||||
|
|
||||||
|
|
||||||
# Possible direct assignments:
|
# Possible direct assignments:
|
||||||
|
|
|
||||||
|
|
@ -1976,23 +1976,14 @@ TESTDATA_13 = [
|
||||||
['Unknown status = unknown status'],
|
['Unknown status = unknown status'],
|
||||||
'INFO - Total complete: 20/ 25 80% skipped: 3,' \
|
'INFO - Total complete: 20/ 25 80% skipped: 3,' \
|
||||||
' failed: 2, error: 1\r'
|
' failed: 2, error: 1\r'
|
||||||
),
|
)
|
||||||
(
|
|
||||||
TestInstanceStatus.TIMEOUT, True, False, True,
|
|
||||||
['INFO 20/25 dummy platform' \
|
|
||||||
' dummy.testsuite.name' \
|
|
||||||
' UNKNOWN' \
|
|
||||||
' (dummy handler type: dummy dut, 60.000s/seed: 123)'],
|
|
||||||
None
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'status, verbose, cmake_only, ready_run, expected_logs, expected_out',
|
'status, verbose, cmake_only, ready_run, expected_logs, expected_out',
|
||||||
TESTDATA_13,
|
TESTDATA_13,
|
||||||
ids=['verbose error cmake only', 'failed', 'verbose skipped', 'filtered',
|
ids=['verbose error cmake only', 'failed', 'verbose skipped', 'filtered',
|
||||||
'verbose passed ready run', 'verbose passed', 'unknown status',
|
'verbose passed ready run', 'verbose passed', 'unknown status']
|
||||||
'timeout']
|
|
||||||
)
|
)
|
||||||
def test_projectbuilder_report_out(
|
def test_projectbuilder_report_out(
|
||||||
capfd,
|
capfd,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue