@@ -1205,7 +1205,7 @@ def parse_test_results_xml_file(args, item, item_name, tests, assemblies):
12051205 Args:
12061206 xml_result_file : results xml file to parse
12071207 args : arguments
1208- tests : dictionary of individual test results
1208+ tests : list of individual test results
12091209 assemblies : dictionary of per-assembly aggregations
12101210 """
12111211
@@ -1252,14 +1252,13 @@ def parse_test_results_xml_file(args, item, item_name, tests, assemblies):
12521252 if test_location_on_filesystem is None or not os .path .isfile (test_location_on_filesystem ):
12531253 test_location_on_filesystem = None
12541254 test_output = test .findtext ("output" )
1255- assert tests [test_name ] == None
1256- tests [test_name ] = defaultdict (lambda : None , {
1255+ tests .append (defaultdict (lambda : None , {
12571256 "name" : test_name ,
12581257 "test_path" : test_location_on_filesystem ,
12591258 "result" : result ,
12601259 "time" : time ,
12611260 "test_output" : test_output
1262- })
1261+ }))
12631262 if result == "Pass" :
12641263 assembly_info ["passed" ] += 1
12651264 elif result == "Fail" :
@@ -1283,7 +1282,6 @@ def print_summary(tests, assemblies):
12831282 failed_tests = []
12841283
12851284 for test in tests :
1286- test = tests [test ]
12871285 if test ["result" ] == "Fail" :
12881286 print ("Failed test: %s" % test ["name" ])
12891287
@@ -1350,7 +1348,7 @@ def create_repro(args, env, tests):
13501348 """
13511349 assert tests is not None
13521350
1353- failed_tests = [tests [ item ] for item in tests if tests [ item ][ "result" ] == "Fail" and tests [ item ] ["test_path" ] is not None ]
1351+ failed_tests = [test for test in tests if test [ "result" ] == "Fail" and test ["test_path" ] is not None ]
13541352 if len (failed_tests ) == 0 :
13551353 return
13561354
@@ -1395,7 +1393,7 @@ def main(args):
13951393
13961394 if not args .skip_test_run :
13971395 assemblies = defaultdict (lambda : None )
1398- tests = defaultdict ( lambda : None )
1396+ tests = []
13991397 parse_test_results (args , tests , assemblies )
14001398 print_summary (tests , assemblies )
14011399 create_repro (args , env , tests )
0 commit comments