Measure code coverage
This commit is contained in:
parent
85a55b7727
commit
55df8c3a0e
|
@ -5,7 +5,8 @@ script:
|
|||
-sdk "$SDK" -destination "$DESTINATION" -derivedDataPath build
|
||||
-enableCodeCoverage YES ENABLE_TESTABILITY=YES "$ACTION"
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- ruby scripts/coverage.rb "$SCHEME"
|
||||
- bash <(curl -s https://codecov.io/bash) -f 'coverage.txt'
|
||||
env:
|
||||
matrix:
|
||||
- SDK=iphonesimulator CONFIGURATION=Debug ACTION=test
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
project_name = ARGV[0]
|
||||
profdata = Dir.glob(File.join('build', '/**/Coverage.profdata')).first
|
||||
Dir.glob(File.join('build', "/**/#{project_name}")) do |target|
|
||||
output = `xcrun llvm-cov report -instr-profile "#{profdata}" "#{target}" -arch=x86_64`
|
||||
if $?.success?
|
||||
puts output
|
||||
`xcrun llvm-cov show -instr-profile "#{profdata}" "#{target}" -arch=x86_64 -use-color=0 > coverage.txt`
|
||||
break
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue