SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.55k stars 236 forks source link

Failed to load coverage: Malformed coverage data #400

Open Sicness opened 6 years ago

Sicness commented 6 years ago

Hello,

XCode 9.2 Command to build (taken from Fastlane output):

$ set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace ./Prj.xcworkspace -scheme SCHEME -destination 'platform=iOS Simulator,id=4214CBF7-8C87-4346-9377-654089DE9BDC' -derivedDataPath './DerivedData' -enableCodeCoverage YES build test | tee '/Users/devops/Library/Logs/scan/SCHEME-SCHEME.log' | xcpretty --report html --output '/Users/devops/jenkins_home/workspace/iOS_Sonar_Test/reports/report.html' --report junit --output '/Users/devops/jenkins_home/workspace/iOS_Sonar_Test/reports/report.junit' --report junit

Executed 3177 tests, with 0 failures (0 unexpected) in 45.946 (48.270) seconds

Slather execution:

slather coverage --cobertura-xml --build-directory ./DerivedData --output-directory ./reports --verbose --scheme SCHEME ./Prj.xcodeproj Slathering... Processing coverage file: /Users/devops/jenkins_home/workspace/iOS_Sonar_Test/DerivedData/Build/ProfileData/4214CBF7-8C87-4346-9377-654089DE9BDC/Coverage.profdata Against binary files: /Users/devops/jenkins_home/workspace/iOS_Sonar_Test/DerivedData/Build/Products/Debug-iphonesimulator/SCHEME.app/SCHEME error: /Users/devops/jenkins_home/workspace/iOS_Sonar_Test/DerivedData/Build/Products/Debug-iphonesimulator/SCHEME.app/SCHEME: Failed to load coverage: Malformed coverage data Slathered

where /Users/devops/jenkins_home/workspace/iOS_Sonar_Test/DerivedData/Build/Products/Debug-iphonesimulator/SCHEME.app/SCHEME is a 54MB binary file.

Any ideas? Thank you.

yishuiliunian commented 5 years ago

any new?

rick711003 commented 5 years ago

Also help same issue in slather-2.4.6