@@ -129,6 +129,7 @@ def __init__(self, total=0):
129
129
self ._none_cases = Value ('i' , 0 )
130
130
self ._started_cases = Value ('i' , 0 )
131
131
132
+ self ._warnings = Value ('i' , 0 )
132
133
133
134
self .lock = Lock ()
134
135
@@ -186,6 +187,20 @@ def summary(self):
186
187
print (f" └─ { 'Test cases only started: ' :<25} { self .started_cases :>{executed_cases_n_length }} " )
187
188
print ("--------------------------------------------------" )
188
189
190
+ @property
191
+ def warnings (self ):
192
+ with self ._warnings .get_lock ():
193
+ return self ._warnings .value
194
+
195
+ @warnings .setter
196
+ def warnings (self , value ):
197
+ with self ._warnings .get_lock ():
198
+ self ._warnings .value = value
199
+
200
+ def warnings_increment (self , value = 1 ):
201
+ with self ._warnings .get_lock ():
202
+ self ._warnings .value += value
203
+
189
204
@property
190
205
def cases (self ):
191
206
with self ._cases .get_lock ():
@@ -1324,15 +1339,18 @@ def _add_instance_testcases_to_status_counts(instance, results, decrement=False)
1324
1339
# but having those statuses in this part of processing is an error.
1325
1340
case TwisterStatus .NONE :
1326
1341
results .none_cases_increment (increment_value )
1327
- logger .error (f'A None status detected in instance { instance .name } ,'
1342
+ logger .warning (f'A None status detected in instance { instance .name } ,'
1328
1343
f' test case { tc .name } .' )
1344
+ results .warnings_increment (1 )
1329
1345
case TwisterStatus .STARTED :
1330
1346
results .started_cases_increment (increment_value )
1331
- logger .error (f'A started status detected in instance { instance .name } ,'
1347
+ logger .warning (f'A started status detected in instance { instance .name } ,'
1332
1348
f' test case { tc .name } .' )
1349
+ results .warnings_increment (1 )
1333
1350
case _:
1334
- logger .error (f'An unknown status "{ tc .status } " detected in instance { instance .name } ,'
1351
+ logger .warning (f'An unknown status "{ tc .status } " detected in instance { instance .name } ,'
1335
1352
f' test case { tc .name } .' )
1353
+ results .warnings_increment (1 )
1336
1354
1337
1355
1338
1356
def report_out (self , results ):
0 commit comments