Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37277

Provide a way to add CPS-transformed code in a plugin to code coverage

    Details

    • Similar Issues:

      Description

      It'd be handy to be able to add CPS-transformed code from a plugin (i.e., JENKINS-37011 or a GlobalVariable) to code coverage.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            I do not see any practical way to do this. Code coverage tools typically instrument bytecode. The bytecode generated by the CPS transformer is not going to make any sense to such a tool. So you would have to write a custom extension to the CPS transformer that inserts instrumentation calls directly to a particular code coverage tool, like JaCoCo.

            Seems like it is not worth the marginal gains. Better to write as much as you can in Java.

            Show
            jglick Jesse Glick added a comment - I do not see any practical way to do this. Code coverage tools typically instrument bytecode. The bytecode generated by the CPS transformer is not going to make any sense to such a tool. So you would have to write a custom extension to the CPS transformer that inserts instrumentation calls directly to a particular code coverage tool, like JaCoCo. Seems like it is not worth the marginal gains. Better to write as much as you can in Java.
            Hide
            jglick Jesse Glick added a comment -

            I think this approach has been abandoned.

            Show
            jglick Jesse Glick added a comment - I think this approach has been abandoned.

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: