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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Imran M Yousuf <imran@...>
Cc: Robin Rosenberg <robin.rosenberg.lists@...>, Shawn O. Pearce <spearce@...>, <git@...>, Imran M Yousuf <imyousuf@...>
Date: Friday, September 12, 2008 - 4:40 am

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@diku.dk>
---
 jgit-maven/jgit/pom.xml |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

 Imran M Yousuf <imran@smartitengineering.com> wrote Fri, Sep 12, 2008:
 > On Fri, Sep 12, 2008 at 6:00 AM, Jonas Fonseca <fonseca@diku.dk> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[JGIT PATCH 1/2] Issue 23: Resolve tag^0 as tag^{commit}, Jonas Fonseca, (Thu Sep 11, 5:39 pm)
Re: [JGIT PATCH 1/2] Issue 23: Resolve tag^0 as tag^{commit}, Robin Rosenberg, (Thu Sep 11, 6:47 pm)
Re: [JGIT PATCH 1/2] Issue 23: Resolve tag^0 as tag^{commit}, Robin Rosenberg, (Fri Sep 12, 2:47 am)
[JGIT PATCH] Configure the maven surefire plugin to specific..., Jonas Fonseca, (Fri Sep 12, 4:40 am)