Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-180

add testsources element to clover-check

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.2
    • 2.1.0
    • Ant Tasks
    • None

      without this, clover-check isnt meaningful if testsources is used in clover-report

        1. clover.jar
          5.66 MB

            [CLOV-180] add testsources element to clover-check

            Owen made changes -
            Workflow Original: New Clover Workflow [ 897816 ] New: New Clover Workflow - Restricted [ 1474401 ]
            Piotr Swiecicki made changes -
            Workflow Original: Clover Workflow [ 895944 ] New: New Clover Workflow [ 897816 ]
            Piotr Swiecicki made changes -
            Workflow Original: reviewflow [ 123328 ] New: Clover Workflow [ 895944 ]
            Marek Parfianowicz made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            Greg Allen added a comment -

            This almost works. However, it is also necessary to be able to define the source fileset.

            For example:

            <target name="with.clover">
            <property name="clover.enabled" value="true" />

            <fileset id="clover.sources" dir="${basedir}">
            <include name="*/src/java/" />
            <include name="*/test/java/" />
            <exclude name="gensrc/" />
            </fileset>

            <clover-setup enabled="${clover.enabled}" initstring="${clover.db}">
            <fileset refid="clover.sources" />
            ...

            When the clover-check targets are calculated they seem to be including our generated classes, found under gensrc/. We do not wish to consider the generated classes for coverage, and they are already properly omitted from the coverage reports.

            Can clover-check limit itself to just the fileset already configured in clover-setup? If not can it accept a fileset itself, just like clover-report?

            Greg Allen added a comment - This almost works. However, it is also necessary to be able to define the source fileset. For example: <target name="with.clover"> <property name="clover.enabled" value="true" /> <fileset id="clover.sources" dir="${basedir}"> <include name="*/src/java/" /> <include name="*/test/java/" /> <exclude name="gensrc/" /> </fileset> <clover-setup enabled="${clover.enabled}" initstring="${clover.db}"> <fileset refid="clover.sources" /> ... When the clover-check targets are calculated they seem to be including our generated classes, found under gensrc/. We do not wish to consider the generated classes for coverage, and they are already properly omitted from the coverage reports. Can clover-check limit itself to just the fileset already configured in clover-setup? If not can it accept a fileset itself, just like clover-report?
            Nick made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Implemented [ 10025 ] New: Resolved [ 5 ]
            Nick made changes -
            Attachment New: clover.jar [ 24826 ]
            Nick made changes -
            Status Original: In Progress [ 3 ] New: Implemented [ 10025 ]

            Nick added a comment -

            Here is a patched 2.1 development build containing the fix for this .
            You can now supply a nested <testsources> element to clover-check.
            This will also be available in the upcoming 2.2 release.
            Simply copy this clover.jar over the top of your existing clover.jar .

            Nick added a comment - Here is a patched 2.1 development build containing the fix for this . You can now supply a nested <testsources> element to clover-check. This will also be available in the upcoming 2.2 release. Simply copy this clover.jar over the top of your existing clover.jar .
            Geoff Crain (Inactive) made changes -
            Status Original: Open [ 1 ] New: In Progress [ 3 ]

              gcrain Geoff Crain (Inactive)
              gcrain Geoff Crain (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: