@@ -208,14 +208,27 @@ def generate_coverage(self, llvm_version="20"):
208208 output_dir = build_dir / "coverage"
209209 output_dir .mkdir (exist_ok = True )
210210
211+ print (f"Looking for .profraw files in: { build_dir } " )
212+ print (f"Current working directory: { os .getcwd ()} " )
213+
211214 # Find all .profraw files
212- profraw_files = list (build_dir .glob ("**/*.profraw" ))
215+ # First look in current directory (where tests are run)
216+ cwd = Path .cwd ()
217+ profraw_files = list (cwd .glob ("*.profraw" ))
218+ # Also look in build directory if different
219+ if cwd != build_dir :
220+ profraw_files .extend (list (build_dir .glob ("*.profraw" )))
221+ # Look recursively if still nothing found
222+ if not profraw_files :
223+ profraw_files = list (build_dir .glob ("**/*.profraw" ))
213224 if not profraw_files :
214225 raise Exception (
215226 "No .profraw files found. Make sure to run tests with LLVM_PROFILE_FILE set."
216227 )
217228
218229 print (f"Found { len (profraw_files )} .profraw files" )
230+ for f in profraw_files [:5 ]: # Show first 5 files
231+ print (f" - { f } " )
219232
220233 # Merge profiles
221234 profdata_file = output_dir / "coverage.profdata"
@@ -328,8 +341,15 @@ def _execute(args_dict, env):
328341 runner .run_processes (args_dict ["additional_mpi_args" ])
329342 elif args_dict ["running_type" ] == "processes_coverage" :
330343 # Run both threads and processes tests, then generate coverage
331- runner .run_threads ()
332- runner .run_processes (args_dict ["additional_mpi_args" ])
344+ # Continue even if tests fail to generate coverage report
345+ try :
346+ runner .run_threads ()
347+ except Exception as e :
348+ print (f"Warning: Thread tests failed: { e } " )
349+ try :
350+ runner .run_processes (args_dict ["additional_mpi_args" ])
351+ except Exception as e :
352+ print (f"Warning: Process tests failed: { e } " )
333353 # Generate coverage report
334354 runner .generate_coverage (args_dict .get ("llvm_version" , "20" ))
335355 elif args_dict ["running_type" ] == "performance" :
0 commit comments