summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplatform/ios/scripts/code-coverage.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/ios/scripts/code-coverage.sh b/platform/ios/scripts/code-coverage.sh
index 6d11eece5e..d4c535ae62 100755
--- a/platform/ios/scripts/code-coverage.sh
+++ b/platform/ios/scripts/code-coverage.sh
@@ -3,7 +3,10 @@
set -e
set -o pipefail
-# Get code coverage, then convert it to JSON.
+# Get code coverage report, then convert it to JSON.
+# The coverage reports end up in different locations based on whether coverage
+# is generated via CI or locally.
+#
cov_result="";
if [ -f build/ios/Logs/Test/*.xcresult/*_Test/*.xccovreport ]; then
cov_result=build/ios/Logs/Test/*.xcresult/*_Test/*.xccovreport
@@ -17,7 +20,8 @@ fi
xcrun xccov view $cov_result --json > output.json
#
-# Convert the line coverage for the dynamic target to a percentage.
+# Convert the line coverage for the dynamic target to a percentage. Currently,
+# only CI tests are included when calculated code coverage.
#
percentage=`node -e "console.log(require('./output.json').lineCoverage)"`
cov=$(printf "%.2f" $(echo "$percentage*100" | bc -l))