Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/zsh -l | ||
set -e | ||
|
||
function exportlcov() { | ||
build_type=$1 | ||
executable_name=$2 | ||
|
||
executable=$(find "${directory}" -type f -name $executable_name) | ||
profile=$(find "${directory}" -type f -name 'Coverage.profdata') | ||
output_file_name="$executable_name.lcov" | ||
|
||
can_proceed=true | ||
if [[ $build_type == watchOS* ]]; then | ||
echo "\tAborting creation of $output_file_name – watchOS not supported." | ||
elif [[ -z $profile ]]; then | ||
echo "\tAborting creation of $output_file_name – no profile found." | ||
elif [[ -z $executable ]]; then | ||
echo "\tAborting creation of $output_file_name – no executable found." | ||
else | ||
output_dir=".build/artifacts/$build_type" | ||
mkdir -p $output_dir | ||
|
||
output_file="$output_dir/$output_file_name" | ||
echo "\tExporting $output_file" | ||
xcrun llvm-cov export -format="lcov" $executable -instr-profile $profile > $output_file | ||
fi | ||
} | ||
|
||
for directory in $(git rev-parse --show-toplevel)/.build/derivedData/*/; do | ||
build_type=$(basename $directory) | ||
echo "Finding coverage information for $build_type" | ||
|
||
exportlcov $build_type 'CacheAdvanceTests' | ||
exportlcov $build_type 'CADCacheAdvanceTests' | ||
done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters