Skip to content

Instantly share code, notes, and snippets.

@Alexander-Ignition
Created June 13, 2020 08:07
Show Gist options
  • Save Alexander-Ignition/408dd882ac9c255677adc828c713ccc8 to your computer and use it in GitHub Desktop.
Save Alexander-Ignition/408dd882ac9c255677adc828c713ccc8 to your computer and use it in GitHub Desktop.
swift test code coverage
swift test --enable-code-coverage
BINARY_PATH=".build/x86_64-apple-macosx/debug/CombineCoreDataPackageTests.xctest/Contents/MacOS/CombineCoreDataPackageTests"
PROF_DATA_PATH=".build/x86_64-apple-macosx/debug/codecov/default.profdata"
xcrun llvm-cov report \
$BINARY_PATH \
--format=text \
-instr-profile="$PROF_DATA_PATH" \
-ignore-filename-regex=Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment