You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/08/05 21:32:03 UTC

svn commit: r1369652 - in /maven/surefire/trunk/surefire-integration-tests: pom.xml src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java

Author: olamy
Date: Sun Aug  5 19:32:03 2012
New Revision: 1369652

URL: http://svn.apache.org/viewvc?rev=1369652&view=rev
Log:
make this useInterpolatedSettings configurable tru cli and use canonicalPath to prevent issue with symlink on jenkins server

Modified:
    maven/surefire/trunk/surefire-integration-tests/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java

Modified: maven/surefire/trunk/surefire-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/pom.xml?rev=1369652&r1=1369651&r2=1369652&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/pom.xml Sun Aug  5 19:32:03 2012
@@ -38,6 +38,7 @@
     <testng.version>5.7</testng.version>
     <surefire.threadcount>1</surefire.threadcount>
     <mavenHomeUsed>${maven.home}</mavenHomeUsed>
+    <useInterpolatedSettings>true</useInterpolatedSettings>
   </properties>
 
   <dependencies>
@@ -92,8 +93,7 @@
               <maven.repo.local>${project.basedir}/../surefire-setup-integration-tests/target/it-repo</maven.repo.local>
               <maven.test.tmpdir>${project.build.directory}</maven.test.tmpdir>
               <user.localRepository>${settings.localRepository}</user.localRepository>
-              <!-- olamy fail on jenkins so don't use that -->
-              <useInterpolatedSettings>false</useInterpolatedSettings>
+              <useInterpolatedSettings>${useInterpolatedSettings}</useInterpolatedSettings>
               <testBuildDirectory>${project.build.testOutputDirectory}</testBuildDirectory>
             </systemPropertyVariables>
           </configuration>
@@ -150,6 +150,9 @@
   <profiles>
     <profile>
       <id>parallel</id>
+      <properties>
+        <useInterpolatedSettings>false</useInterpolatedSettings>
+      </properties>
       <build>
         <pluginManagement>
           <plugins>
@@ -159,9 +162,6 @@
               <configuration>
                 <parallel>classes</parallel>
                 <threadCount>${surefire.threadcount}</threadCount>
-                <systemPropertyVariables combine.self="override">
-                  <useInterpolatedSettings>false</useInterpolatedSettings>
-                </systemPropertyVariables>
               </configuration>
             </plugin>
           </plugins>

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java?rev=1369652&r1=1369651&r2=1369652&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireLauncher.java Sun Aug  5 19:32:03 2012
@@ -19,12 +19,6 @@ package org.apache.maven.surefire.its.fi
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import org.apache.commons.lang.text.StrSubstitutor;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
@@ -35,6 +29,13 @@ import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Encapsulate all needed features to start a surefire run
  * <p/>
@@ -287,7 +288,7 @@ public class SurefireLauncher
         {
             if ( useInterpolatedSettings )
             {
-                File interpolatedSettings = File.createTempFile( "interpolated-settings", "xml" );
+                File interpolatedSettings = new File( testBuildDirectory, "interpolated-settings" );
 
                 if ( !interpolatedSettings.exists() )
                 {
@@ -304,10 +305,9 @@ public class SurefireLauncher
 
                     FileUtils.fileWrite( interpolatedSettings.getAbsolutePath(), filtered );
 
-
                 }
 
-                cliOptions.add( "-s " + interpolatedSettings.getAbsolutePath() );
+                cliOptions.add( "-s " + interpolatedSettings.getCanonicalPath() );
             }
             verifier.setCliOptions( cliOptions );