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

Chunk pathnames_per_binary into segments that do not exceed the OS ARG_MAX size for calls to llvm-cov #414

Merged
merged 8 commits into from
Nov 30, 2018

Conversation

weibel
Copy link
Contributor

@weibel weibel commented Nov 13, 2018

I have encountered the issue in #243 which is not easily solvable. This is an attempt to fix the problem by chunking calls llvm cov into smaller segments which are recombined. I'll give it some time to see if there are any problems.

Chunked the call to llvm-cov show into multiple pieces to prevent a E2BIG error
@coveralls
Copy link

coveralls commented Nov 13, 2018

Coverage Status

Coverage increased (+0.08%) to 95.72% when pulling ba4e9b1 on weibel:master into 1bb36e4 on SlatherOrg:master.

@dnedrow
Copy link
Contributor

dnedrow commented Nov 14, 2018

@weibel , please be sure to fix up the unit testing so coverage doesn't fall.

@weibel
Copy link
Contributor Author

weibel commented Nov 15, 2018

@dnedrow Coverage is back up.

@ksuther
Copy link
Contributor

ksuther commented Nov 15, 2018

Thanks for this! Looks good to me, but it'd be nice to have confirmation from someone who was encountering the original problem. @diaojunxian, could you see if this solves the problem you encountered?

@weibel
Copy link
Contributor Author

weibel commented Nov 16, 2018

My main concerns with this is

…tch it.

This circumvents guessing the usable size of ARG_MAX and will also work on systems where it's not possible to query 'getconf ARG_MAX'. I feel much better about this as it leaves the original flow intact and will only split the work into two if exactly Errno::E2BIG is raised. This should work across Unix/Win/MacOS.
@weibel
Copy link
Contributor Author

weibel commented Nov 18, 2018

I have addressed my concerns with ba4e9b1

@ksuther ksuther merged commit 819bc9e into SlatherOrg:master Nov 30, 2018
@ksuther
Copy link
Contributor

ksuther commented Nov 30, 2018

Thanks @weibel!

@stevebaxter
Copy link

Any chance of a release that includes this fix sometime soon? We're running in to this issue!

@weibel weibel mentioned this pull request Jan 28, 2020
@mrdjtoto
Copy link

mrdjtoto commented Jun 10, 2020

Hello,
I am facing the same problem on one of my code coverage calculation. I've performed the unit test in fastlane with scan (calling them all from Jenkins) and then I am using slather to get the code coverage in llcov format. This is the command and the following output:

slather coverage --jenkins --llvm-cov --build-directory ./DerivedData --binary-basename 'My App Mobile' --output-directory ./sonar-reports --scheme MYA_UAT --workspace MyApp.xcworkspace MyApp.xcodeproj
/Users/vobadm/.rvm/gems/ruby-2.4.2/gems/slather-2.4.7/lib/slather.rb:26: warning: Insecure world writable dir /change in PATH, mode 040777
Slathering...
sh: /usr/bin/xcrun: Argument list too long
Slathered

I'm running on xcode 11.3

Is there a way to get through this? I've read about this fix. Will it be released sometime soon? Thank you so much.

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

Successfully merging this pull request may close these issues.

6 participants