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

Add support to profdata file format #92

Merged
merged 73 commits into from Jan 19, 2016

Conversation

viteinfinite
Copy link
Contributor

Hey,
I'm adding experimental support to the profdata file format (i.e. the format used in Xcode 7 beta).

The current implementation calls llvm-cov and reads the subsequent output.
Two new configuration parameters have been added:

  • scheme: allows the selection of a scheme; it is used to find the folder containing the correct instrumentation data
  • input-format: in case the value is profdata, Slather will look for the Coverage.profdata file inside the build directory

Branch information is not included at the moment as I still have to figure out how (and if) this information is actually included in the Coverage.profdata file.

Please feel free to discuss or inquiry about any implementation detail.

@sync
Copy link

sync commented Jun 18, 2015

YauShop/Utils/TegQ.swift: 4 of 10 lines (40.00%)
YauShop/Utils/TegRecycler.swift: 0 of 11 lines (0.00%)
YauShop/Utils/TegRegex.swift: 12 of 15 lines (80.00%)
YauShop/Utils/TegScreenSize.swift: 0 of 22 lines (0.00%)
YauShop/Utils/TegScreenType.swift: 0 of 3 lines (0.00%)
YauShop/Utils/TegSecureRandom.swift: 11 of 15 lines (73.33%)
YauShop/Utils/TegString.swift: 27 of 27 lines (100.00%)
YauShop/Utils/TegTextFileLoader.swift: 4 of 4 lines (100.00%)
YauShop/Utils/TegTickTock.swift: 0 of 23 lines (0.00%)
YauShop/Utils/TegUIColor.swift: 37 of 37 lines (100.00%)
YauShop/Utils/TegUrlEncoder.swift: 5 of 5 lines (100.00%)
YauShop/Utils/TegViewPosition.swift: 0 of 25 lines (0.00%)
YauShop/Utils/UI/KeyboardObserver.swift: 31 of 34 lines (91.18%)
YauShop/Utils/UI/RoundedButton.swift: 7 of 10 lines (70.00%)
YauShop/Utils/UI/RoundedView.swift: 10 of 10 lines (100.00%)
Test Coverage: 39.79%
Slathered

@viteinfinite
Copy link
Contributor Author

@sync thank you for the usage sample!

@sync
Copy link

sync commented Jun 18, 2015

right now it seems that:

  • the JSON exporter doesn't work
  • coverall doesn't work
  • cobertura is working

@viteinfinite
Copy link
Contributor Author

Thank you for the feedback, I've been working on some improvements. I'll push the modifications in some hours.

…te/slather into feature-temp-profdata

* 'feature-temp-profdata' of https://github.com/viteinfinite/slather:
  Remove useless file
  Fix tests
  Remove useless files
  Fix unit tests
  Add more precise path handling
  Add scheme and ignore
  Export coverage base info into modules
  Fix coveralls_spec
  Minor fixes in spec_helper
  Re-add coveralls support
  Re-add coveralls support
  Add tests
  [WIP] Refactor interface of coverage_file
  [WIP] Add unit tests
  [WIP] Add experimental support to swift
@marklarr
Copy link
Contributor

This is cool -- I'll check it out this week!

@viteinfinite
Copy link
Contributor Author

@marklarr Any update on this?

pmairoldi and others added 3 commits August 8, 2015 14:39
* petester42-master:
  Add spec for framework coverage
  Fix llvm-cov path and add framework coverage
@mjdetullio
Copy link

Built and installed the Gem from source. Using the Cobertura reporting now and recording it in Jenkins. Works great.

/usr/local/bin/slather \
        coverage \
        --cobertura-xml \
        --output-directory "${WORKSPACE}/build/coverage-reports" \
        --input-format profdata \
        --build-directory "${WORKSPACE}/DerivedData" \
        --source-directory . \
        --ignore '../**' \
        --ignore 'SomeSource/generated/**' \
        --ignore 'Tests/**' \
        --scheme "MyTests" \
        MyProject.xcodeproj

One thing I noticed is it has to be run from the source root, otherwise the rest of the tree is displayed on the report, regardless of the --source-directory option. Just ended up doing a pushd/popd into the source root and setting the source dir as the current dir.

@marklarr
Copy link
Contributor

Hey @viteinfinite -- I was out on vacation for a couple weeks. I'll get to looking at this later this week!

@marklarr
Copy link
Contributor

@viteinfinite Is this ready to be merged? It looks good to me. We just need to resolve the conflicts.

@viteinfinite
Copy link
Contributor Author

@marklarr I can close this PR and submit a new one resolving the conflicts or you manually merge them. Either way, the work on the feature itself is completed.

viteinfinite and others added 6 commits August 29, 2015 16:32
…te/slather into feature-temp-profdata

* 'feature-temp-profdata' of https://github.com/viteinfinite/slather:
  Remove useless file
  Fix tests
  Remove useless files
  Fix unit tests
  Add more precise path handling
  Add scheme and ignore
  Export coverage base info into modules
  Fix coveralls_spec
  Minor fixes in spec_helper
  Re-add coveralls support
  Re-add coveralls support
  Add tests
  [WIP] Refactor interface of coverage_file
  [WIP] Add unit tests
  [WIP] Add experimental support to swift
@cuteiosdev cuteiosdev mentioned this pull request Aug 29, 2015
@viteinfinite
Copy link
Contributor Author

@tarbrain thanks for your feedback. I totally agree with you.
I'll start working on this next week.

@viteinfinite
Copy link
Contributor Author

@tarbrain So here it is. These last commits modify the specs in order to test against the profdata output.

Also, a verbose mode (--verbose or -v) has been added which avoids printing the debug lines by default.

Finally, platform headers, such as Library/Frameworks/XCTest.framework/Headers/XCTestAssertionsImpl.h, are now filtered.

@jkrumow
Copy link
Collaborator

jkrumow commented Jan 18, 2016

@viteinfinite Looks sweet. I would say we all give it a try and if nobody finds a bug I will merge it soon.

Good work 🎉

jkrumow pushed a commit that referenced this pull request Jan 19, 2016
Add support to profdata file format
@jkrumow jkrumow merged commit 7a0921b into SlatherOrg:master Jan 19, 2016
@jkrumow
Copy link
Collaborator

jkrumow commented Jan 19, 2016

@viteinfinite Its done!
@marklarr @ayanonagon You can release a new gem version 👍

@viteinfinite
Copy link
Contributor Author

🎉🎉🎉

@viteinfinite
Copy link
Contributor Author

@tarbrain BTW, gem's not pushed yet?

@jkrumow
Copy link
Collaborator

jkrumow commented Jan 26, 2016

I can not push the gem since I do not belong to the developers at venmo.

We should ask @marklarr or @ayanonagon again.

@ayanonagon
Copy link
Contributor

@tarbrain Is your email the one listed on GitHub? If so I’ll add you as an owner to the gem. Thanks for helping us out. We really appreciate it! 😃

@jkrumow
Copy link
Collaborator

jkrumow commented Jan 26, 2016

@ayanonagon @marklarr Thanks for adding me to the list.

But please do not rely on me for maintaining this repository. I wont have the time. I am just one of the many professional slather users who are waiting for the important profdata feature and feel somewhat let down by the venmo developers. You have a big user base and you should take responsibility for that.

Regards
tarbrain

@richardbuckle
Copy link

As a user, I do hope that the gem will be pushed soon. It has been quite a long wait.

I've been holding off on publishing a blog post about getting Xcode 7 to play nice with Jenkins because I want my instructions for installing slather to be simply gem install slather. It doesn't feel right to send people to a fork of the repo but maybe that would be better than waiting much longer.

@ayanonagon
Copy link
Contributor

@tarbrain We’re very sorry for the wait. It’s clear that we haven’t done a great job in maintaining this project. The main issues are that nobody on the current iOS team is fluent in Ruby and also that we are not currently using this project in our own workflow. It’s unfair to make other developers wait because of us, so we apologize again for that.

On a happier note, our friend @neonichu has graciously offered to pick up maintaining the project. As you might have noticed, we pulled it out into a separate GitHub organization as well. Anyway, slather is in more capable hands now, so we’re excited to see where the community takes it. 🎉

Thanks!

@AliSoftware
Copy link
Contributor

@ayanonagon never apologize for doing OpenSource and giving such a great tool to the community for free 😉

@neonichu thx for picking up on the project maintenance 🎉

@neonichu
Copy link
Member

neonichu commented Feb 3, 2016

@ayanonagon @marklarr 🍻

@neonichu neonichu mentioned this pull request Feb 3, 2016
@neonichu
Copy link
Member

neonichu commented Feb 3, 2016

Allright, created a milestone for 2.0 https://github.com/SlatherOrg/slather/milestones/2.0.0, once the things in there are addressed, we can :shipit:

@viteinfinite
Copy link
Contributor Author

@ayanonagon thanks for the update.
@neonichu, may your crafty hands save us from bugs dues to uncovered code.

@jkrumow
Copy link
Collaborator

jkrumow commented Feb 4, 2016

@ayanonagon @neonichu
Thank you for the response! I think making slather an organization is a good decision and makes it easier to participate. Very good!

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.

None yet