Giter VIP home page Giter VIP logo

Comments (8)

kylef avatar kylef commented on July 26, 2024

@marklarr Carrying on from #1, it does generate the gcno file for me:

$ gcov /Users/kylef/Library/Developer/Xcode/DerivedData/CGFloatType-frmsjnookkqwtzbqdjrjdjkwsfvu/Build/Intermediates/Pods.build/Debug/Pods-CGFloatTypeTests-CGFloatType.build/Objects-normal/x86_64/CGFloatType.gcno
File '/Users/kylef/Projects/kylef/CGFloatType/CGFloatType.m'
Lines executed:94.44% of 36

Problem is, that the pods is generated, thus enabling Instrument program flow and Generate test coverage files would only exist locally if you do not commit your Pods/ directory.

from slather.

kylef avatar kylef commented on July 26, 2024

Easy workaround, using podspec instead of pod in your Podfile and manually adding the files to the project.

from slather.

marklarr avatar marklarr commented on July 26, 2024

Nice. Also, would it be possible to make a cocoapods plugin that automatically enabled Instrument program flow and Generate test coverage file on specified pods?

from slather.

kylef avatar kylef commented on July 26, 2024

Once CocoaPods/Core#142 gets finished up, I intend to write a CocoaPods plugin to actually run tests without an Xcode project.

I guess it would be pretty easy to use llvm and gcov manually with the Pods source_files and the test files from the podspec. Slather could then itself expose a command in CocoaPods to generate coverage reports for a podspec (along with uploading them to coveralls). Similar to https://github.com/kattrali/docstat and https://github.com/neonichu/cocoapods-docstats, docstats will eventually get integrated into CocoaDocs to publish documentation stats in cocoadocs.org.

$ pod lib coverage VENTokenField.podspec
VENTokenField has 97% test coverage.
- VENToken.m 100%
- VENTokenField.m 52%
- VENBackspaceTextField.m 14%
$ pod lib coveralls VENTokenField.podspec

from slather.

kylef avatar kylef commented on July 26, 2024

Second though, maybe CocoaPods should just place a test target for each Pod into Pods.xcodeproj.

from slather.

marklarr avatar marklarr commented on July 26, 2024

That #142 is really awesome. I definitely see it opening up good possibilities for slather.
It'd basically just be a matter of telling slather where to find the source files (it'd be in the Pods/YourPod directory instead of in the project.path, or something?)

from slather.

marklarr avatar marklarr commented on July 26, 2024

475d471

Probably should have gotten a review on this before cowboy'ing it into master, but I'd appreciate a look over :)

from slather.

marklarr avatar marklarr commented on July 26, 2024

#11

from slather.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.