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

Reports are empty on Xcode 13 #507

Open
edias opened this issue Oct 19, 2021 · 8 comments
Open

Reports are empty on Xcode 13 #507

edias opened this issue Oct 19, 2021 · 8 comments

Comments

@edias
Copy link

edias commented Oct 19, 2021

Just updated CLI to Xcode 13 and now the reports are coming empty.

They display normally on XCode13.

image

@josher8
Copy link

josher8 commented Oct 26, 2021

I don't know if this solution could be similar, but I was getting back 0% test code coverage after Xcode 13 and took me over a day to figure it out. It wasn't Slather's fault. In the project settings build settings, I turned off and on Enable Code Coverage Support. I made sure Generate Legacy Test Coverage Files and Instrument Program Flow is set to No.

In my xcodebuild script, I removed GCC_INSTRUMENT_PROGRAM_FLOW=YES and GCC_GENERATE_TEST_COVERAGE_FILES=YES, and replaced it with -enableCodeCoverage YES.

After I did those things, it solved the problem!

@jmonroe
Copy link

jmonroe commented Nov 16, 2021

I am seeing the same thing.
I run slather through Fastlane and have verified that code coverage is enabled for that scheme and have set code_coverage(true) in my scanfile. When running tests in Jenkins I do see coverage results. Additionally, the "profdata" file that Slather says it is processing is not empty.

@ggilley
Copy link

ggilley commented Jan 12, 2022

Anyone find a solution?

@jaimeeee
Copy link

jaimeeee commented May 2, 2022

To add to this comment, I'm having this exact same issue but opposite as reported, locally or works for me, but on Jenkins (both Xcode 13.3) returns NaN.

@svendr
Copy link

svendr commented May 19, 2022

Having the same problem with Xcode13.4 on macOS 12.4. Code Coverage is calculated perfectly fine on a local machine, while the CI-Build-Agent returns NaN. The corresponding .profdata-file is identical and contains the expected data (which can be inspected via xcrun llvm-cov report -instr-profile). I'm running slather 2.7.2 on both machines.

@tengfoung
Copy link

Managed to solve this issue by moving the node's root directory out from /private/var/jenkins to /Users/<username>/jenkins.

To change the root directory:

  1. Go to the Node > Configure > Remote root directory and change the path.
  2. Restart Jenkins.

@vamsig7
Copy link

vamsig7 commented Sep 30, 2022

Any one got a working solution for this? we are using bamboo instead of Jenkins and facing a similar issue.I tried downloading the profile data from the build agent and ran slather locally its working fine, but empty reports in bamboo. @edias have you got any work around?

@Morkrom
Copy link

Morkrom commented Dec 19, 2022

I don't know if it is related: I see the project files, though the files I have test coverage for display 0%. And overall less than 1% coverage though the project is more like 10%.

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

9 participants