From the llvm-cov docs:
llvm-cov show [options] -instr-profile PROFILE BIN [-object BIN,...] [[-object BIN]] [SOURCES]
The llvm-cov show command shows line by line coverage of the binaries BIN,... using the profile data PROFILE. It can optionally be filtered to only show the coverage for the files listed in SOURCES.
I'm using the following command:
xcrun llvm-cov show -instr-profile "${PROFDATA}" "${BINARY}" codecov_source_files > Coverage.report
Where codecov_source_files
is a file with this line:
*Router.swift
So basically what I want is the report to only contain files with the suffix: Router.swift
But i'm getting a Coverage.report with all the classes in the project.
What am I missing?
SOURCES
could be a folder. That really should be documented. Here is a full example of this for others that was tested with Clang 4.0. It will only show coverage for files in thesrc_dir
folder.llvm-cov show -format=html -instr-profile=default.profdata my_exe src_dir/ > coverage.html
– Afterclap