fastlane-community / danger-xcov

Danger plugin to validate the code coverage of the files changed in a pull request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to export xccovreport from xcresult

intoxicated opened this issue · comments

[11:17:06]: Derived content from ["/Users/wooyoung.chung/Development/xxx/build/Logs/Test//Test-Transient Testing-2020.05.29_11-13-05--0700.xcresult", "/Users/wooyoung.chung/Development/messaging-ios/build/Logs/Test//LogStoreManifest.plist"]
[11:17:06]: Error occured while exporting xccovreport from xcresult '/Users/wooyoung.chung/Development/xxx/build/Logs/Test/Test-Transient Testing-2020.05.29_11-13-05--0700.xcresult'
[11:17:06]: Make sure you have both Xcode 11 selected and pointing to the correct xcresult file

but there is a xcresult file in the path. Any idea?

weird thing is sometime it works and sometimes it doesn't

it seems like if output path exists, it fails

it seems like if output path exists, it fails

I'm experiencing this behavior as well. I can get around this in my CI, but I feel like this is a bug.

👋 Hello! Would either of you be able to provide any more detail on this?

To be honest... I don’t use xcov in personal projects so also not with danger but I’m happy to look into! Would be good to have any info that you may have that would help 🤷‍♂️

I'm actually not using Danger, just vanilla xcov (1.7.5). I just found this thread through googling the exact string "Error occured while exporting xccovreport from xcresult", and there were only like 2 hits.

I can't provide a solid example project, since I'm encountering this with one of my employer's projects, but I doubt it would be hard to reproduce. Here's my directory structure:

.
├── [typical fastlane files]
├── README.md
├── report.xml
└── test_output
    ├── code-coverage
    │   ├── index.html
    │   ├── resources
    │   │   ├── application.css
    │   │   ├── application.js
    │   │   ├── bootstrap.min.css
    │   │   ├── bootstrap.min.js
    │   │   ├── file_cpp.png
    │   │   ├── file_objc.png
    │   │   ├── file_swift.png
    │   │   ├── jquery.min.js
    │   │   ├── main.css
    │   │   ├── main.js
    │   │   ├── opensans.css
    │   │   └── xcov_logo.png
    │   ├── xccovarchive-0.xccovarchive
    │   │   ├── Coverage
    │   │   ├── Index
    │   │   └── Metadata.plist
    │   └── xccovreport-0.xccovreport
    ├── report.html
    └── report.junit

All I'm doing to get around this is running a rm -rf ../fastlane/test_output/code-coverage before the next call to xcov.

Maybe the -0 on the .xccovarchive and .xccovreport is messing things up?

I really appreciate the info! I’ll try and find some time in my queue for this 😊

removing the xcov code coverage output before the next run allows it to succeed consistently

commented

removing the xcov code coverage output before the next run allows it to succeed consistently

Correct, I would like to solve this bug@joshdholtz

worked for me when i used project parameter instead of workspace..