mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 19:57:46 +00:00
[harness-automation] save case failure times (#4261)
Save failure times for each case for judging if case passes randomly.
This commit is contained in:
@@ -106,10 +106,14 @@ class SimpleTestResult(unittest.TestResult):
|
||||
test (TestCase): The test just run
|
||||
passed (bool): Whether the case is passed
|
||||
"""
|
||||
fails = self.result.get(test.__class__.__name__, {}).get('fails', 0)
|
||||
if passed is False:
|
||||
fails += 1
|
||||
self.result[str(test.__class__.__name__)] = {
|
||||
'started': self.started,
|
||||
'stopped': time.strftime('%Y-%m-%dT%H:%M:%S'),
|
||||
'passed': passed,
|
||||
'fails': fails,
|
||||
'error': error,
|
||||
'executions': SimpleTestResult.executions,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user