fastlane-community / xcov

Nice code coverage reporting without hassle
MIT License
556 stars 107 forks source link

Parameter '--derived_data_path' is not applied #151

Open NikitaZamalyutdinov opened 5 years ago

NikitaZamalyutdinov commented 5 years ago

We have build / run / generate coverage reports on different physical machines. We use jenkins as CI server and faced with unclear behavior of parameter --derived_data_path. We expect that when there are sources and derived data within jenkins workspace and we run command xcov -j . -s <scheme> -o <out_dir> finally we got well generated html report. There is prepared workspace structure:

Workspace
  |- Logs/Test   - results of run test with enabled coverage (.acarchive, .xcreport)
  |- sources - project file and all sources here
  |- Product - build here

Output:

[13:16:59]: $ /Library/Ruby/Gems/2.3.0/gems/xcov-1.5.0/lib/xcov-core/bin/xcov-core -s Logs/Test/out.xccovreport -o coverage_report/tmp/report.json20190506-3174-vbzrhc --ide-foundation-path /Applications/Xcode.app/Contents/Developer/../Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
[13:16:59]: ▸ Loading...
[13:16:59]: ▸ Opening .xccoverage file at path: <REPORT_PATH>
[13:16:59]: ▸ Parsing .xccoverage file...
[13:16:59]: ▸ File successfully parsed
[13:16:59]: ▸ Serializing coverage report...
[13:16:59]: ▸ Report successfully serialized
[13:16:59]: ▸ Writing report on disk...
[13:16:59]: ▸ Coverage report successfully created at path: <OUTPUT_PATH>/tmp/report.json20190506-3174-vbzrhc
[13:16:59]: $ xcodebuild -showBuildSettings -workspace<WORKSPACE> -scheme <SCHEME>

[13:17:02]: Error accessing file, this might be due to fastlane's directory handling
[13:17:02]: Check out https://docs.fastlane.tools/advanced/#directory-behavior for more details

/Library/Ruby/Gems/2.3.0/gems/xcov-1.5.0/lib/xcov/ignore_handler.rb:55:in `realpath': No such file or directory @ realpath_rec - <BUILD_PATH_ANOTHER_NODE> (Errno::ENOENT)

Where BUILD_PATH_ANOTHER_NODE is path to workspace contained build, but it's cached path which is not actual now. I investigated value of BUILD_PATH_ANOTHER_NODE is extracted from .xccovreport file. Would it mean _-j (--derived_datapath) parameter works wrong ? Or as alternative could you propose another code coverage report generating tool compatible with Xcode xccov outputs?