aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-02-18 17:59:05 -0800
committerjmkiley <jordan.kiley@mapbox.com>2019-03-14 13:01:06 -0700
commitd724176def4ed23cac954b674fb4bbd9df046f67 (patch)
tree02a847cdfae2550f3aca8928304497741106708c
parentc0635db76043ffaedca4b44a7f18877b3e42d676 (diff)
[ios] testing out coverage script
-rwxr-xr-xplatform/ios/scripts/code-coverage.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/ios/scripts/code-coverage.sh b/platform/ios/scripts/code-coverage.sh
index 15250a2d9..3d079c075 100755
--- a/platform/ios/scripts/code-coverage.sh
+++ b/platform/ios/scripts/code-coverage.sh
@@ -5,7 +5,7 @@ set -o pipefail
# Get code coverage
-xcodebuild -workspace platform/ios/ios.xcworkspace -scheme CI -enableCodeCoverage YES build -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
+# xcodebuild -workspace platform/ios/ios.xcworkspace -scheme CI -enableCodeCoverage YES build test -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# echo build/Logs/Test/*.xcresult
# result=
@@ -14,4 +14,9 @@ cov_result=build/ios/ios/Logs/Test/*.xcresult/*_Test/*.xccovreport
echo $cov_result
xcrun xccov view $cov_result --json > output.json
+# json
+percentage=`node -e "console.log(require('./output.json').lineCoverage)"`
+
+echo "$(($percentage * 100))"
+
rm -rf build/ios/ios/Logs/Test/*.xcresult/ \ No newline at end of file