jonreid / XcodeCoverage

Code coverage for Xcode projects (Objective-C only)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to generate code coverage with Xcode 10 Beta

usmaanirfan opened this issue · comments

HI,

I am generating Code coverage using terminal after test cases succeed by running run_code_coverage_post.sh. It works fine with Xcode 10.4.1, but on Xcode 10 beta it's giving below errors: Please help me in resolving these this issue.

geninfo: ERROR: cannot read /Users/Abhishek/Library/Developer/Xcode/DerivedData/TRADFRI-fuzpwmjhzkdzrbbfjbnlwglkcolz/Build/Intermediates.noindex/TRADFRI_LIB.build/Debug-iphonesimulator/TRADFRI_LIBTests.build/Objects-normal/undefined_arch!
Reading tracefile Coverage.info
lcov: ERROR: cannot read file Coverage.info!
Reading tracefile Coverage.info
lcov: ERROR: cannot read file Coverage.info!
cat: /Users/Abhishek/Documents/Usman/LSProject/tradfri-ios/External/FREKVENS_LIB/.xcodecoverageignore: No such file or directory
Reading tracefile Coverage.info
lcov: ERROR: cannot read file Coverage.info!
Reading data file Coverage.info
genhtml: ERROR: cannot read file Coverage.info!
The file /Users/Abhishek/Library/Developer/Xcode/DerivedData/TRADFRI-fuzpwmjhzkdzrbbfjbnlwglkcolz/Build/Products/Debug-iphonesimulator/lcov/index.html does not exist.

Thanks and Regards,
Usman Ansari

Hello Usman,
I'm sorry that it's taken me so long to see your issue.
Have you tried with the latest Xcode release?

@jonreid I got the same issue with the latest Xcode 10 release version .When i run ./getcov --show -v It can't locate the right OBJ_DIR path whitch contain the gcno and gcov files.


--------improtant output---------
Show HTML Report
Verbose
XcodeCoverage: Environment
scripts : /Users/UserName/Documents/Project/SampleProject/Pods/XcodeCoverage
output_dir : /Users/UserName/Library/Developer/Xcode/DerivedData/SampleProject-eepzocumhdnsjmbxjasszpiflskn/Build/Products/Debug-iphonesimulator
LCOV_INFO : Coverage.info
BUILD_DIR : /Users/UserName/Library/Developer/Xcode/DerivedData/SampleProject-eepzocumhdnsjmbxjasszpiflskn/Build/Products/Debug-iphonesimulator
SRCROOT : /Users/UserName/Documents/Project/SampleProject
OBJ_DIR : /Users/UserName/Library/Developer/Xcode/DerivedData/SampleProject-eepzocumhdnsjmbxjasszpiflskn/Build/Intermediates.noindex/SampleProject.build/Debug-iphonesimulator/SampleProject.build/Objects-normal/undefined_arch
LCOV_PATH : /Users/UserName/Documents/Project/SampleProject/Pods/XcodeCoverage/lcov-1.13/bin



UPDATE:
I found that in Xcode 10 CURRENT_ARCH is set to string undefined_arch
so XcodeCoverage can't get the right arch value.
I think it can use ARCHS to get the right value

same issues

Temporary workaround: switch back to Legacy Build System.
In Xcode menu, select File -> Project Settings…

Fixed in a27d911