You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/11/08 10:12:59 UTC

DO NOT REPLY [Bug 52151] New: [PATCH] A code-coverage tool for code analysis

https://issues.apache.org/bugzilla/show_bug.cgi?id=52151

             Bug #: 52151
           Summary: [PATCH] A code-coverage tool for code analysis
           Product: Fop
           Version: 1.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: med1985@gmail.com
    Classification: Unclassified


Created attachment 27909
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27909
jacoco code coverage

This patch adds a code-coverage ant task in jacoco.xml such that the invoking
command would be:
ant -f jacoco.xml clean code-coverage

This, like the find-bugs task, requires that ${jacoco.lib} property is set best
done in a build-local.properties file.

Jacoco is the successor to Emma, which is a well established code analysis tool

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52151] [PATCH] A code-coverage tool for code analysis

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52151

Mehdi Houshmand <me...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27909|0                           |1
        is obsolete|                            |

--- Comment #2 from Mehdi Houshmand <me...@gmail.com> 2011-11-16 11:44:14 UTC ---
Created attachment 27948
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27948
code coverage tool

Made the changes requested

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52151] [PATCH] A code-coverage tool for code analysis

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52151

Mehdi Houshmand <me...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52151] [PATCH] A code-coverage tool for code analysis

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52151

Vincent Hennebert <vh...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Vincent Hennebert <vh...@gmail.com> 2011-11-18 17:11:42 UTC ---
Patch applied in rev. 1203749:
http://svn.apache.org/viewvc?rev=1203749&view=rev

I made the following changes to jacoco.xml:
- removed unnecessary ivy namespace declaration
- removed unused result.jacoco.report property
- renamed jacoco report dir to report_jacoco to follow the same pattern as the
other tools (Checkstyle, FindBugs, etc.)
- changed classpath of task definition to only include ${jacocoant.jar}
- removed unused errorproperty and failureproperty from junit task
- removed unnecessary JUnit formatters: I think we can safely assume that,
prior to getting coverage report, 'ant junit' has been run and that tests
passed
- removed unnecessary merging of jacoco execution data since only one file is
generated
- renamed targets to more descriptive names and added description to
coverage-report target so that it appears when running ant -p
- other small clean ups

Thanks,
Vincent

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52151] [PATCH] A code-coverage tool for code analysis

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52151

--- Comment #1 from Vincent Hennebert <vh...@gmail.com> 2011-11-08 16:27:19 UTC ---
Hi Mehdi,

There's no jacoco.xml in the patch?

Also, I assume you changed the hyphenation test so that it matches the
*TestCase pattern. This is a good idea but setting the system property in the
getParameters method probably is a bit too much magic. Plus you have to reset
the property afterwards, which is brittle. Maybe the
LayoutEngingTestUtils.getLayoutTestFiles method should be overloaded with a
parameter that directly sets the test set instead of getting it from a system
property.

Small detail in the junit-compile-copy-resources task in build.xml: by using
the '**/*' pattern the Java files will also be copied, which will create
unnecessary I/O.

Thanks,
Vincent

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.