piggly icon indicating copy to clipboard operation
piggly copied to clipboard

gcov/lcov support

Open oldmud0 opened this issue 6 years ago • 2 comments

Hi, I'm very interested in this library, but I would like to integrate it into existing code coverage tools. Is there any way to export the code coverage to an ubiquitous intermediate format, such as gcov, that can be read in by services such as Coveralls?

It seems that I am covering new ground trying to unit-test some PL/pgSQL code that will be used in production.

Thanks in advance.

oldmud0 avatar Jun 18 '19 15:06 oldmud0

That sounds interesting but I'm not aware of all the details of gcov or other formats, so I don't know how much work would be involved. Most likely I won't be able to work on it but would be glad to help you along and accept a PR if you are interested in working on it.

Take a look at https://github.com/kputnam/piggly/blob/master/lib/piggly/command/report.rb to get an idea of how the report data is generated. You would probably create something analogous to Compiler::CoverageReport which is being used from Reporter::Procedure.

On Tue, Jun 18, 2019, at 10:46 AM, oldmud0 wrote:

Hi, I'm very interested in this library, but I would like to integrate it into existing code coverage tools. Is there any way to export the code coverage to an ubiquitous intermediate format, such as gcov, that can be read in by services such as Coveralls?

It seems that I am covering new ground trying to unit-test some PL/pgSQL code that will be used in production.

Thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kputnam/piggly/issues/44?email_source=notifications&email_token=AABZSFSDO6RAYATHXK6B6BDP3D7MLA5CNFSM4HZBNZKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2FZUHQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AABZSFWQZ3ESY5MYFBDAVBLP3D7MLANCNFSM4HZBNZKA.

kputnam avatar Jun 18 '19 17:06 kputnam

Thanks for your fast response.

Unfortunately, I don't have experience with Ruby - I'd be flapping around for a week before I began to do something meaningful. Oh, well, it's not that big of a deal - thanks for your help anyway.

oldmud0 avatar Jun 25 '19 03:06 oldmud0