maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r597953 - in /maven/surefire/trunk: maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
Date Sun, 25 Nov 2007 04:22:10 GMT
Author: dfabulich
Date: Sat Nov 24 20:22:07 2007
New Revision: 597953

URL: http://svn.apache.org/viewvc?rev=597953&view=rev
Log:
[SUREFIRE-186] Strip off .java if somebody passes in -Dtest=Foo.java

Modified:
    maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java

Modified: maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java?rev=597953&r1=597952&r2=597953&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
(original)
+++ maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
Sat Nov 24 20:22:07 2007
@@ -660,6 +660,10 @@
                 for ( int i = 0; i < testRegexes.length; i++ )
                 {
                     String testRegex = testRegexes[i];
+                    if (testRegex.endsWith( ".java" ))
+                    {
+                        testRegex = testRegex.substring( 0, testRegex.length() - 5 );
+                    }
                     // Allow paths delimited by '.' or '/'
                     testRegex = testRegex.replace('.', '/');
                     includes.add( "**/" + testRegex + ".java" );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java?rev=597953&r1=597952&r2=597953&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
(original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestSingleTest.java
Sat Nov 24 20:22:07 2007
@@ -34,7 +34,7 @@
         HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );        
     }
     
-    public void XXXtestSingleTestDotJava()
+    public void testSingleTestDotJava()
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration"
);



Mime
View raw message