mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-12 06:53:11 +02:00
Merge bitcoin/bitcoin#35153: doc: update llvm based coverage example
ef21e29298doc: update llvm based coverage example (Max Edwards) Pull request description: The old example was working on my Mac but when run on Linux I was finding that I had missing coverage information. On some systems the old example of using xargs to pass list of profraw files can exceed xargs's argument limit resulting in multiple executions of llvm-profdata merge command which overwrites it's output file losing coverage information. This PR switches the example to using a file with a list of filenames. There are other ways to solve this like using bash's globbing or a one liner with temporary file but I felt like this was the most simple, robust and easy to understand. ACKs for top commit: vasild: ACKef21e29298sedited: ACKef21e29298Tree-SHA512: 2726d9b38088c1c0b6f04d4622bdc4ea28e16b13a962a3afc842798aa5e0eee4682752c73707c5580a43bdb9d0d84d542afd357f166e4dbb7f6beb7afc0522c8
This commit is contained in:
@@ -457,7 +457,8 @@ LLVM_PROFILE_FILE="$(pwd)/build/raw_profile_data/%m_%p.profraw" ctest --test-dir
|
||||
LLVM_PROFILE_FILE="$(pwd)/build/raw_profile_data/%m_%p.profraw" build/test/functional/test_runner.py # Append "-j N" here for N parallel jobs
|
||||
|
||||
# Merge all the raw profile data into a single file
|
||||
find build/raw_profile_data -name "*.profraw" | xargs llvm-profdata merge -o build/coverage.profdata
|
||||
find build/raw_profile_data -name "*.profraw" > build/raw_profile_data_files.txt
|
||||
llvm-profdata merge -f build/raw_profile_data_files.txt -o build/coverage.profdata
|
||||
```
|
||||
|
||||
> **Note:** The "counter mismatch" warning can be safely ignored, though it can be resolved by updating to Clang 19.
|
||||
|
||||
Reference in New Issue
Block a user