From 51cd3ddf252735bb42c1d57c6f0dcac1dd2cb7da Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Thu, 30 Apr 2026 15:53:45 +0700 Subject: [PATCH] fix(cov): use absolute binary path in llvm-cov run command bare 'rippled' wasn't on PATH and the build dir isn't '.', so the profile-collection step failed with 'No such file or directory'. splice the resolved absolute path back into Cov_EXECUTABLE before the run command consumes it. --- cmake/CodeCoverageLLVM.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/CodeCoverageLLVM.cmake b/cmake/CodeCoverageLLVM.cmake index b89098f61..b438ea6e9 100644 --- a/cmake/CodeCoverageLLVM.cmake +++ b/cmake/CodeCoverageLLVM.cmake @@ -76,12 +76,16 @@ function(setup_target_for_coverage_llvm) set(_profdata "${PROJECT_BINARY_DIR}/${Cov_NAME}.profdata") # Resolve binary path: accept either an absolute path or a bare target name - # (resolved against PROJECT_BINARY_DIR). + # (resolved against PROJECT_BINARY_DIR). Splice the resolved path back into + # Cov_EXECUTABLE so the run command invokes it via absolute path - bare + # names aren't on PATH and the build dir isn't `.` either. list(GET Cov_EXECUTABLE 0 _exec_name) if(IS_ABSOLUTE "${_exec_name}") set(_binary "${_exec_name}") else() set(_binary "${PROJECT_BINARY_DIR}/${_exec_name}") + list(REMOVE_AT Cov_EXECUTABLE 0) + list(PREPEND Cov_EXECUTABLE "${_binary}") endif() # llvm-cov takes a single -ignore-filename-regex; OR our excludes together.