Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
faster processing
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepeak committed Jan 28, 2016
1 parent 8aabe4b commit b882504
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,17 @@ swiftcov() {
if [ "${_proj%%_*}" != "Pods" ];
then
say " $g+$x Building reports for $_proj $_type"
_proj_name=$(echo "$_proj" | sed -e 's/[[:space:]]//g')

# remove source from files
_proj_name=$(echo "$_proj" | sed -e 's/[[:space:]]//g')
while IFS='' read -r line;
do
# remove all spaces
line=$(echo "$line" | tr -d '[[:space:]]')
if [ -z "$line" ]; then : # [skip] empty line
elif [[ "$line" == '|'* ]]; then : # [skip] irrelvent data
elif [[ "$line" == '-'* ]]; then : # [skip] irrelvent data
elif [[ "$line" == '/'* ]]; then
# file name
echo "$line"
else
# coverage data
echo ${line%|*}
elif [[ "$line" == ' '*'|'* ]]; then : # [skip] irrelvent data
elif [[ "$line" == ' '*'-'* ]]; then : # [skip] irrelvent data
elif [[ "$line" == '/'* ]]; then # file name
echo "$line"
else # coverage data: remove source from file
echo ${line%|*}
fi
done <<< $(xcrun llvm-cov show -instr-profile "$1" "$f/$_proj" || echo "") >> "$_proj_name.$_type.coverage.txt"

Expand Down

0 comments on commit b882504

Please sign in to comment.