1515TMP_RESULTS_FILE = "tmp-results-file.json"
1616
1717def get_cts_test_suite_names (working_directory ):
18- process = Popen (["ctest" , "--show-only=json-v1" ], cwd = working_directory ,
18+ process = Popen (["ctest" , "--show-only=json-v1" ], cwd = working_directory ,
1919 stdout = PIPE , env = os .environ .copy ())
2020 out ,_ = process .communicate ()
2121 testsuites = json .loads (out )
22- return [test ['name' ]for test in testsuites ['tests' ]]
22+ return [
23+ test ['name' ][:test ['name' ].rfind ('-' )] for test in testsuites ['tests' ]
24+ ]
2325
2426def percent (amount , total ):
2527 return round ((amount / total ) * 100 , 2 )
@@ -39,7 +41,7 @@ def summarize_results(results):
3941 crash_rate = percent (total_crashed , total )
4042
4143 ljust_param = len (str (total ))
42-
44+
4345 print (
4446f"""[CTest Parser] Results:
4547 Total [{ str (total ).ljust (ljust_param )} ]
@@ -85,7 +87,7 @@ def run(args):
8587 results [suite ] = {}
8688 test_executable = f"{ args .ctest_path } /bin/test-{ suite } "
8789 process = Popen ([test_executable , "--gtest_list_tests" ], env = env ,
88- stdout = DEVNULL if args .quiet else None ,
90+ stdout = DEVNULL if args .quiet else None ,
8991 stderr = DEVNULL if args .quiet else None )
9092 process .wait ()
9193 try :
@@ -98,8 +100,8 @@ def run(args):
98100
99101 for suite in test_suite_names :
100102 ctest_path = f"{ args .ctest_path } /test/conformance/{ suite } "
101- process = Popen (['ctest' ,ctest_path ], env = env , cwd = ctest_path ,
102- stdout = DEVNULL if args .quiet else None ,
103+ process = Popen (['ctest' ,ctest_path ], env = env , cwd = ctest_path ,
104+ stdout = DEVNULL if args .quiet else None ,
103105 stderr = DEVNULL if args .quiet else None )
104106 process .wait ()
105107
@@ -111,7 +113,7 @@ def run(args):
111113 except FileNotFoundError :
112114 results [suite ]['actual' ] = None
113115 print ('\033 [91m' + f"Conformance test suite '{ suite } ' : likely crashed!" + '\033 [0m' )
114-
116+
115117 return results
116118
117119def dir_path (string ):
0 commit comments