@@ -1205,7 +1205,7 @@ def parse_test_results_xml_file(args, item, item_name, tests, assemblies):
1205
1205
Args:
1206
1206
xml_result_file : results xml file to parse
1207
1207
args : arguments
1208
- tests : dictionary of individual test results
1208
+ tests : list of individual test results
1209
1209
assemblies : dictionary of per-assembly aggregations
1210
1210
"""
1211
1211
@@ -1252,14 +1252,13 @@ def parse_test_results_xml_file(args, item, item_name, tests, assemblies):
1252
1252
if test_location_on_filesystem is None or not os .path .isfile (test_location_on_filesystem ):
1253
1253
test_location_on_filesystem = None
1254
1254
test_output = test .findtext ("output" )
1255
- assert tests [test_name ] == None
1256
- tests [test_name ] = defaultdict (lambda : None , {
1255
+ tests .append (defaultdict (lambda : None , {
1257
1256
"name" : test_name ,
1258
1257
"test_path" : test_location_on_filesystem ,
1259
1258
"result" : result ,
1260
1259
"time" : time ,
1261
1260
"test_output" : test_output
1262
- })
1261
+ }))
1263
1262
if result == "Pass" :
1264
1263
assembly_info ["passed" ] += 1
1265
1264
elif result == "Fail" :
@@ -1283,7 +1282,6 @@ def print_summary(tests, assemblies):
1283
1282
failed_tests = []
1284
1283
1285
1284
for test in tests :
1286
- test = tests [test ]
1287
1285
if test ["result" ] == "Fail" :
1288
1286
print ("Failed test: %s" % test ["name" ])
1289
1287
@@ -1350,7 +1348,7 @@ def create_repro(args, env, tests):
1350
1348
"""
1351
1349
assert tests is not None
1352
1350
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 ]
1354
1352
if len (failed_tests ) == 0 :
1355
1353
return
1356
1354
@@ -1395,7 +1393,7 @@ def main(args):
1395
1393
1396
1394
if not args .skip_test_run :
1397
1395
assemblies = defaultdict (lambda : None )
1398
- tests = defaultdict ( lambda : None )
1396
+ tests = []
1399
1397
parse_test_results (args , tests , assemblies )
1400
1398
print_summary (tests , assemblies )
1401
1399
create_repro (args , env , tests )
0 commit comments