Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCode 7 is not supported #40

Closed
konrad-g opened this issue Sep 22, 2015 · 17 comments
Closed

XCode 7 is not supported #40

konrad-g opened this issue Sep 22, 2015 · 17 comments

Comments

@konrad-g
Copy link

When running on XCode 7 I get:

lcov: ERROR: no valid records found in tracefile Coverage.info
Reading data file Coverage.info
genhtml: ERROR: no valid records found in tracefile Coverage.info
Coverage report is in lcov folder

@jonreid
Copy link
Owner

jonreid commented Sep 23, 2015

Xcode 7 generates coverage in a different file format.
More info in this article: https://www.bignerdranch.com/blog/weve-got-you-covered/
I'm keeping an eye on this: SlatherOrg/slather#89

@DaidoujiChen
Copy link

the same issue.

1 similar comment
@mmesutt
Copy link

mmesutt commented Oct 21, 2015

the same issue.

@Torreslol
Copy link

the same issue

@jonreid
Copy link
Owner

jonreid commented Nov 13, 2015

How are things with the lcov update, as of 77afcfc?

@michaelmyers
Copy link

Jon,

Pulling from master, it looks like it is almost back. I had to make the lcov scripts executable and then added get_version.sh from lcov to suppress the error created by this line.

It looks like the Line Data count is off (the numbers are gigantic, 58411*10^7, maybe an unsigned vs signed int issue) however the bigger issue I am experiencing is the cannot merge previous GCDA file: corrupt arc tag console spam followed by a crash. It generates some of the gcda files so the getcov script will process the ones available but (I believe) that crash is preventing the majority of the gcda files from being created.

The consensus after a couple of searches on how to solve the cannot merge issue is to turn off instrumentation and code coverage support, which doesn't help us out. I will report back if I figure anything else out.

Also, thanks for your hard work on the project. You are fighting the good fight.

Michael

@bixbarton
Copy link

Hi Michael - where did you get get_version.sh from?

Also, I'm getting problems. I generate env.sh from within XCode, seemingly ok, then call getcov which starts a scan for GCDA files from the root /. Weird.

@michaelmyers
Copy link

@bixbarton You can get get_version.sh from the lcov project, the development version is here on github. Xcodecoverage uses lcov to convert the coverage data to HTML.

I have not seen the root scan issue that you describe.

@bixbarton
Copy link

Thanks Michael, I put that file in place and things run smoother. The root scan issue was my mistake, not setting the environment variables correctly.

Only issue I have now is that Xcode 7 isn't generating any GCDA files for this project. Utterly bizarre. Code Coverage is on, Legacy is on.

@bixbarton
Copy link

Ok, so the reason I'm not generating GCDA files is that INSTRUMENT_PROGRAM_FLOW is set to NO. But setting it to YES causes my test run to fail. Lots of "cannot merge previous GCDA file: corrupt arc tag" entries in the console, and it then crashes in main.m showing BAD_ACCESS on the line calling UIApplicationMain.

I cannot turn INSTRUMENT_PROGRAM_FLOW on for the main target, but without it, I cannot generate GCDA files.

Anyone have any ideas for this?

@bixbarton
Copy link

Is XcodeCoverage going to be updated to work with the LLVM-COV profdata file?

@jstevenco
Copy link

FYI -- I am seeing the same behavior @bixbarton describes with the crash in main.m. Confirmed on Xcode 7.2.

@jonreid
Copy link
Owner

jonreid commented Dec 25, 2015

Thanks to everyone for investigating this while I was occupied elsewhere.

I've made the lcov scripts executable, and added the missing script. "Seems to work" so far on a library, but I haven't tried an app yet.

@bixbarton and @jstevenco, could you verify that you have the following enabled:

GCC_GENERATE_TEST_COVERAGE_FILES
CLANG_ENABLE_CODE_COVERAGE
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS

@bixbarton
Copy link

I can verify that Jon. All 3 are set to yes.

On Friday, 25 December 2015, Jon Reid notifications@github.com wrote:

Thanks to everyone for investigating this while I was occupied elsewhere.

I've made the lcov scripts executable, and added the missing script.
"Seems to work" so far on a library, but I haven't tried an app yet.

@bixbarton https://github.com/bixbarton and @jstevenco
https://github.com/jstevenco, could you verify that you have the
following enabled:

GCC_GENERATE_TEST_COVERAGE_FILES
CLANG_ENABLE_CODE_COVERAGE
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS


Reply to this email directly or view it on GitHub
#40 (comment)
.

@Panajev
Copy link

Panajev commented Feb 29, 2016

I was able to generate code coverage on our project which uses the iOS 9 SDK, but the lcov version in the current tagged release (which the pod references is wrong): #43.

@jonreid
Copy link
Owner

jonreid commented Mar 1, 2016

Closing, at least for now.

@jonreid jonreid closed this as completed Mar 1, 2016
@Manoj412
Copy link

Manoj412 commented Jun 7, 2016

Still I am getting coverage.info empty...Can some one help me please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants