bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

Invoke javac with debug parameter #57

Closed ndrwdn closed 7 years ago

ndrwdn commented 9 years ago

This adds a parameter to the compiler options to invoke javac with the debug flag. This is to fix issues my team is having with Clover and Spring MVC code.

I would like to write a test for this, but I'm struggling with it and am hoping for some guidance. My plan for testing this is to add an integration test that invokes the plugin with the debug flag set to true and then assert using ASM to read the bytecode and verify that debugging info is present. The part I'm having trouble with is that the plugin restores the original classes, which means that after the plugin has completed running I don't have access to the instrumented classes in my test. Is there some way to turn off the restore for a test? Or perhaps, capture the instrumented classes before the restore occurs?

bmuschko commented 9 years ago

Thanks for the pull request. I am going to look over it in the following days and give you some feedback.

bmuschko commented 9 years ago

I think it's OK not to write tests for this. It sounds fairly complex to me. Can we instead write some unit tests that demonstrates that the correct value is passed on to InstrumentCodeAction?

jeremymefford commented 8 years ago

@bmuschko Can we please get this merged in? it's causing me problems currently and i'm going to have to work off of this branch until it's merged into trunk

Alex-Vol commented 7 years ago

The contents of this PR were merged with PR#84. I added integration tests for this and updated the release notes.