[JGIT PATCH] Configure the maven surefire plugin to specifically include all tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



By default, the test cases named T000* were not included. With this
patch maven reports that 508 tests have been run.

Signed-off-by: Jonas Fonseca <fonseca@xxxxxxx>
---
 jgit-maven/jgit/pom.xml |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

 Imran M Yousuf <imran@xxxxxxxxxxxxxxxxxxxxxx> wrote Fri, Sep 12, 2008:
 > On Fri, Sep 12, 2008 at 6:00 AM, Jonas Fonseca <fonseca@xxxxxxx> wrote:
 > > When I run all the tests using maven (inside
 > > NetBeans or from the command line) it tells me:
 > >
 > >        Tests run: 428, Failures: 0, Errors: 0, Skipped: 0
 > >
 > > From the output it looks like the tests in the files named T000* are
 > > never run. However, where the breakage is (could be my setup) I don't
 > > know. Imran?
 > >
 > 
 > Hmm, I will have to check it. Will come back with some feedback after
 > checking. Usually if a class is a TestCase then it should have run.
 
 I started looking for possible bug reports at jira.codehaus.org and
 found an issue for extendeding the default path patterns used for
 including and excluding tests. Maybe something like this patch is clean
 enough, at least it increases "my coverage" to 508 tests.

diff --git a/jgit-maven/jgit/pom.xml b/jgit-maven/jgit/pom.xml
index a64f53c..a123470 100644
--- a/jgit-maven/jgit/pom.xml
+++ b/jgit-maven/jgit/pom.xml
@@ -158,6 +158,17 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     <encoding>UTF-8</encoding>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.4.2</version>
+                <configuration>
+                    <includes>
+                        <include>**/*Test.java</include>
+                        <include>**/*TestCase.java</include>
+                        <include>**/T000*.java</include>
+                    </includes>
+                </configuration>
+           </plugin>
         </plugins>
     </build>
     <dependencies>
-- 
1.6.0.1.451.gc8d31

-- 
Jonas Fonseca
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux