@@ -319,7 +319,8 @@ def _execute(args_dict, env):
319319 elif args_dict ["running_type" ] == "processes" :
320320 runner .run_processes (args_dict ["additional_mpi_args" ])
321321 elif args_dict ["running_type" ] == "processes_coverage" :
322- # Run processes tests
322+ # Run both threads and processes tests, then generate coverage
323+ runner .run_threads ()
323324 runner .run_processes (args_dict ["additional_mpi_args" ])
324325 # Generate coverage report
325326 runner .generate_coverage (args_dict .get ("llvm_version" , "20" ))
@@ -333,33 +334,7 @@ def _execute(args_dict, env):
333334 args_dict = init_cmd_args ()
334335 counts = args_dict .get ("counts" )
335336
336- if args_dict ["running_type" ] == "processes_coverage" :
337- # For coverage, set environment variables for profiling
338- env_copy = os .environ .copy ()
339- env_copy ["LLVM_PROFILE_FILE" ] = "coverage-%p-%m.profraw"
340- env_copy ["PPC_NUM_PROC" ] = "2"
341- env_copy ["PPC_NUM_THREADS" ] = "2"
342- env_copy ["OMPI_ALLOW_RUN_AS_ROOT" ] = "1"
343- env_copy ["OMPI_ALLOW_RUN_AS_ROOT_CONFIRM" ] = "1"
344-
345- # Run threads tests with different counts
346- print ("Running thread tests with coverage..." )
347- threads_args = args_dict .copy ()
348- threads_args ["running_type" ] = "threads"
349- for count in [1 , 2 , 3 , 4 ]:
350- env_threads = env_copy .copy ()
351- env_threads ["PPC_NUM_THREADS" ] = str (count )
352- env_threads ["PPC_NUM_PROC" ] = "1"
353- print (f"Executing with threads count: { count } " )
354- try :
355- _execute (threads_args , env_threads )
356- except Exception as e :
357- print (f"Warning: Thread tests with count { count } failed: { e } " )
358-
359- # Now run the process coverage tests
360- print ("\n Running process tests with coverage..." )
361- _execute (args_dict , env_copy )
362- elif counts :
337+ if counts :
363338 for count in counts :
364339 env_copy = os .environ .copy ()
365340
0 commit comments