@@ -42,6 +42,10 @@ def parse_func(file_path: Path) -> XMLParser:
4242 return parse (file_path , xml_parser )
4343
4444
45+ matches_re = re .compile (r"!######(.*?):(.*?)([^\.:]*?):(.*?):(.*?):(.*?)######!" )
46+ cleaner_re = re .compile (r"!######(.*?)######!" )
47+
48+
4549def parse_test_return_values_bin (file_location : Path , test_files : TestFiles , test_config : TestConfig ) -> TestResults :
4650 test_results = TestResults ()
4751 if not file_location .exists ():
@@ -259,7 +263,13 @@ def parse_test_xml(
259263 message = testcase .result [0 ].message .lower ()
260264 if "timed out" in message :
261265 timed_out = True
262- matches = re .findall (r"!######(.*?):(.*?)([^\.:]*?):(.*?):(.*?):(.*?)######!" , testcase .system_out or "" )
266+
267+ sys_stdout = testcase .system_out or ""
268+ matches = matches_re .findall (sys_stdout )
269+
270+ if sys_stdout :
271+ sys_stdout = cleaner_re .sub ("" , sys_stdout )
272+
263273 if not matches or not len (matches ):
264274 test_results .add (
265275 FunctionTestInvocation (
@@ -278,6 +288,7 @@ def parse_test_xml(
278288 test_type = test_type ,
279289 return_value = None ,
280290 timed_out = timed_out ,
291+ stdout = sys_stdout ,
281292 )
282293 )
283294
@@ -306,6 +317,7 @@ def parse_test_xml(
306317 test_type = test_type ,
307318 return_value = None ,
308319 timed_out = timed_out ,
320+ stdout = sys_stdout ,
309321 )
310322 )
311323
@@ -393,6 +405,7 @@ def merge_test_results(
393405 verification_type = VerificationType (result_bin .verification_type )
394406 if result_bin .verification_type
395407 else None ,
408+ stdout = xml_result .stdout ,
396409 )
397410 )
398411 elif xml_results .test_results [0 ].id .iteration_id is not None :
@@ -422,6 +435,7 @@ def merge_test_results(
422435 verification_type = VerificationType (bin_result .verification_type )
423436 if bin_result .verification_type
424437 else None ,
438+ stdout = xml_result .stdout ,
425439 )
426440 )
427441 else :
@@ -448,6 +462,7 @@ def merge_test_results(
448462 verification_type = VerificationType (bin_result .verification_type )
449463 if bin_result .verification_type
450464 else None ,
465+ stdout = xml_result .stdout ,
451466 )
452467 )
453468
0 commit comments