twister: count retries after failures or errors

When twister is set to retry any failures, count the number of retries
and record the number in the json file. This will help us identify
unstable tests or tests requiring attention.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-10-24 13:34:48 -04:00
commit b89a3d955a
4 changed files with 7 additions and 0 deletions

View file

@ -267,6 +267,8 @@ class Reporting:
if rom_size:
suite["rom_size"] = rom_size
suite['retries'] = instance.retries
if instance.status in ["error", "failed"]:
suite['status'] = instance.status
suite["reason"] = instance.reason