Last active
March 28, 2021 14:11
-
-
Save z-turk3/4e263fc285f6e171f92d6acc9d69455e to your computer and use it in GitHub Desktop.
Revisions
-
z-turk3 revised this gist
Feb 10, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function xccov_to_generic { echo '<coverage version="1">' for xccovarchive_file in "$@"; do local xccov_options="" if [[ $xccovarchive_file == *".xcresult/" ]]; then xccov_options="--archive" fi xcrun xccov view $xccov_options --file-list "$xccovarchive_file" | while read -r file_name; do -
z-turk3 revised this gist
Feb 8, 2020 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,6 @@ function xccov_to_generic { if [[ $xccovarchive_file == *".xcresult"* ]]; then xccov_options="--archive" fi xcrun xccov view $xccov_options --file-list "$xccovarchive_file" | while read -r file_name; do if [[ $file_name == *" "* ]]; then continue -
z-turk3 revised this gist
Feb 8, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function xccov_to_generic { if [[ $file_name == *".m" ]] || [[ $file_name == *".h" ]]; then continue fi convert_file "$xccovarchive_file" "$file_name" "$xccov_options" done done echo '</coverage>' -
z-turk3 revised this gist
Feb 7, 2020 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,9 @@ set -euo pipefail function convert_file { local xccovarchive_file="$1" local file_name="$2" local xccov_options="$3" echo " <file path=\"$file_name\">" xcrun xccov view $xccov_options --file "$file_name" "$xccovarchive_file" | \ sed -n ' s/^ *\([0-9][0-9]*\): 0.*$/ <lineToCover lineNumber="\1" covered="false"\/>/p; s/^ *\([0-9][0-9]*\): [1-9].*$/ <lineToCover lineNumber="\1" covered="true"\/>/p @@ -16,7 +17,12 @@ function convert_file { function xccov_to_generic { echo '<coverage version="1">' for xccovarchive_file in "$@"; do local xccov_options="" if [[ $xccovarchive_file == *".xcresult"* ]]; then xccov_options="--archive" fi xcrun xccov view $xccov_options --file-list "$xccovarchive_file" | while read -r file_name; do if [[ $file_name == *" "* ]]; then continue fi -
z-turk3 revised this gist
Aug 22, 2019 . 1 changed file with 2 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,10 +23,7 @@ function xccov_to_generic { if [[ $file_name == *"/Pods/"* ]]; then continue fi if [[ $file_name == *".m" ]] || [[ $file_name == *".h" ]]; then continue fi convert_file "$xccovarchive_file" "$file_name" @@ -35,4 +32,4 @@ function xccov_to_generic { echo '</coverage>' } xccov_to_generic "$@" -
z-turk3 created this gist
Aug 22, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ #!/usr/bin/env bash set -euo pipefail function convert_file { local xccovarchive_file="$1" local file_name="$2" echo " <file path=\"$file_name\">" xcrun xccov view --file "$file_name" "$xccovarchive_file" | \ sed -n ' s/^ *\([0-9][0-9]*\): 0.*$/ <lineToCover lineNumber="\1" covered="false"\/>/p; s/^ *\([0-9][0-9]*\): [1-9].*$/ <lineToCover lineNumber="\1" covered="true"\/>/p ' echo ' </file>' } function xccov_to_generic { echo '<coverage version="1">' for xccovarchive_file in "$@"; do xcrun xccov view --file-list "$xccovarchive_file" | while read -r file_name; do if [[ $file_name == *" "* ]]; then continue fi if [[ $file_name == *"/Pods/"* ]]; then continue fi if [[ $file_name == *".m" ]]; then continue fi if [[ $file_name == *".h" ]]; then continue fi convert_file "$xccovarchive_file" "$file_name" done done echo '</coverage>' } xccov_to_generic "$@"