@@ -321,8 +321,24 @@ def handle(self, test_spec, target_name, toolchain_name, test_loops=1):
321
321
elapsed_time = time () - start_host_exec_time
322
322
print print_test_result (test_result , target_name , toolchain_name ,
323
323
test_id , test_description , elapsed_time , duration )
324
- return (test_result , target_name , toolchain_name ,
325
- test_id , test_description , round (elapsed_time , 2 ), duration )
324
+ return (self .shape_global_test_loop_result (test_all_result ), target_name , toolchain_name ,
325
+ test_id , test_description , round (elapsed_time , 2 ),
326
+ duration , self .shape_test_loop_ok_result_count (test_all_result ))
327
+
328
+ def shape_test_loop_ok_result_count (self , test_all_result ):
329
+ """ Reformats list of results to simple string """
330
+ test_loop_count = len (test_all_result )
331
+ test_loop_ok_result = test_all_result .count (self .TEST_RESULT_OK )
332
+ return "%d/%d" % (test_loop_ok_result , test_loop_count )
333
+
334
+ def shape_global_test_loop_result (self , test_all_result ):
335
+ """ Reformats list of results to simple string """
336
+ test_loop_count = len (test_all_result )
337
+ test_loop_ok_result = test_all_result .count (self .TEST_RESULT_OK )
338
+ result = self .TEST_RESULT_FAIL
339
+ if all (test_all_result [0 ] == res for res in test_all_result ):
340
+ result = test_all_result [0 ]
341
+ return result
326
342
327
343
def run_host_test (self , name , disk , port , duration , verbose = False , extra_serial = "" ):
328
344
# print "{%s} port:%s disk:%s" % (name, port, disk),
@@ -657,7 +673,6 @@ def generate_test_summary_by_target(test_summary):
657
673
if test [TEST_INDEX ] not in result_dict :
658
674
result_dict [test [TEST_INDEX ]] = { }
659
675
result_dict [test [TEST_INDEX ]][test [TOOLCHAIN_INDEX ]] = test [RESULT_INDEX ]
660
- pass
661
676
662
677
pt_cols = ["Target" , "Test ID" , "Test Description" ] + unique_toolchains
663
678
pt = PrettyTable (pt_cols )
@@ -682,7 +697,7 @@ def generate_test_summary(test_summary):
682
697
result = "Test summary:\n "
683
698
# Pretty table package is used to print results
684
699
pt = PrettyTable (["Result" , "Target" , "Toolchain" , "Test ID" , "Test Description" ,
685
- "Elapsed Time (sec)" , "Timeout (sec)" ])
700
+ "Elapsed Time (sec)" , "Timeout (sec)" , "Loops" ])
686
701
pt .align ["Result" ] = "l" # Left align
687
702
pt .align ["Target" ] = "l" # Left align
688
703
pt .align ["Toolchain" ] = "l" # Left align
0 commit comments