This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1617
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/SUREFIRE-1617 by this push:
     new 6f43cf0  IT
6f43cf0 is described below

commit 6f43cf01f77d4db8ecdc595bba197d43d74388d7
Author: tibordigana <[email protected]>
AuthorDate: Fri May 10 03:32:43 2019 +0200

    IT
---
 .../org/apache/maven/surefire/its/UmlautDirIT.java | 36 ++++++++++++++++++++--
 .../maven/surefire/its/fixture/MavenLauncher.java  |  5 +++
 .../test/resources/junit-pathWithUmlaut/pom.xml    |  5 +++
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java 
b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
index e87c801..41aeee5 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
@@ -19,6 +19,7 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
+import org.apache.maven.shared.utils.io.FileUtils;
 import org.apache.maven.surefire.its.fixture.MavenLauncher;
 import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
 import org.apache.maven.surefire.its.fixture.SurefireLauncher;
@@ -28,8 +29,10 @@ import org.junit.Test;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
 
 import static java.nio.file.Files.copy;
 import static java.nio.file.Files.createDirectories;
@@ -71,8 +74,35 @@ public class UmlautDirIT extends 
SurefireJUnit4IntegrationTestCase
     public void surefire1617WithSpacesInLocalRepo()
             throws Exception
     {
-        assumeTrue( IS_OS_LINUX );
-        unpackWithSpacesInLocalRepo()
+        //assumeTrue( IS_OS_LINUX );
+
+        unpack( "junit-pathWithUmlaut", "_compiled" )
+                .maven()
+                .execute( "compiler:testCompile" );
+
+        String cwd = System.getProperty( "user.dir" );
+
+        Path from = Paths.get( cwd, "target", 
"UmlautDirIT_surefire1617WithSpacesInLocalRepo_compiled", "target",
+                "test-classes", "umlautTest" );
+
+        Path to = Paths.get( cwd, "target", 
"UmlautDirIT_surefire1617WithSpacesInLocalRepo", "target",
+                "test-classes", "umlautTest" );
+
+        MavenLauncher mavenLauncher = unpackWithSpacesInLocalRepo()
+                .maven();
+
+        mavenLauncher.setForkJvm( true );
+        mavenLauncher.setAutoclean( false );
+
+        if ( !Files.exists( to ) )
+        {
+            Files.createDirectories( to );
+        }
+
+        FileUtils.copyDirectory( from.toFile(), to.toFile() );
+
+        mavenLauncher.sysProp( "skipCompiler", true )
+                .debugLogging()
                 .executeTest()
                 .verifyErrorFreeLog()
                 .assertTestSuiteResults( 1, 0, 0, 0 );
@@ -124,7 +154,7 @@ public class UmlautDirIT extends 
SurefireJUnit4IntegrationTestCase
             throws IOException
     {
         String newLocalRepo =
-                Paths.get( System.getProperty( "user.dir" ), "target", "local 
repo for: SUREFIRE-1617" ).toString();
+                Paths.get( System.getProperty( "user.dir" ), "target", "local 
repo for SUREFIRE-1617" ).toString();
         String defaultLocalRepo = new MavenLauncher( getClass(), 
"junit-pathWithUmlaut", null ).getLocalRepository();
 
         copyFolder( Paths.get( defaultLocalRepo, "org", "apache", "maven", 
"surefire" ),
diff --git 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java
 
b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java
index 586ce8c..de1d5f8 100755
--- 
a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java
+++ 
b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java
@@ -381,6 +381,11 @@ public final class MavenLauncher
         return getVerifier().getLocalRepository();
     }
 
+    public void setAutoclean( boolean autoclean )
+    {
+        getVerifier().setAutoclean( autoclean );
+    }
+
     private Verifier getVerifier()
     {
         if ( verifier == null )
diff --git a/surefire-its/src/test/resources/junit-pathWithUmlaut/pom.xml 
b/surefire-its/src/test/resources/junit-pathWithUmlaut/pom.xml
index b90893d..6c79c08 100644
--- a/surefire-its/src/test/resources/junit-pathWithUmlaut/pom.xml
+++ b/surefire-its/src/test/resources/junit-pathWithUmlaut/pom.xml
@@ -31,6 +31,7 @@
   <properties>
     <maven.compiler.source>1.7</maven.compiler.source>
     <maven.compiler.target>1.7</maven.compiler.target>
+    <skipCompiler>false</skipCompiler>
   </properties>
 
   <dependencies>
@@ -56,6 +57,10 @@
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.8.1</version>
+          <configuration>
+            <skip>${skipCompiler}</skip>
+            <skipMain>${skipCompiler}</skipMain>
+          </configuration>
         </plugin>
       </plugins>
     </pluginManagement>

Reply via email to