You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/04/01 19:24:04 UTC

svn commit: r643480 - in /maven/core-integration-testing/trunk/core-integration-tests/src/test: java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java resources/mng-3221/user/pom.xml

Author: jdcasey
Date: Tue Apr  1 10:24:02 2008
New Revision: 643480

URL: http://svn.apache.org/viewvc?rev=643480&view=rev
Log:
Separating the two test types as profiles in the user project for 3221, to make sure they don't interfere with one another.

Modified:
    maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java
    maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3221/user/pom.xml

Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java?rev=643480&r1=643479&r2=643480&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java Tue Apr  1 10:24:02 2008
@@ -5,6 +5,8 @@
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
+import java.util.List;
+import java.util.ArrayList;
 
 public class MavenITmng3221InfiniteForking
     extends AbstractMavenIntegrationTestCase
@@ -19,6 +21,7 @@
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3221" );
+        File logBackupDir = testDir.getAbsoluteFile().getParentFile();
 
         File reportDir = new File( testDir, "report" );
         File projectDir = new File( testDir, "user" );
@@ -36,6 +39,11 @@
             verifier.resetStreams();
 
             verifier = new Verifier( projectDir.getAbsolutePath() );
+
+            List cliOptions = new ArrayList();
+            cliOptions.add( "-Psite" );
+            verifier.setCliOptions( cliOptions );
+
             verifier.executeGoal( "site" );
             verifier.verifyErrorFreeLog();
         }
@@ -47,7 +55,7 @@
             }
 
             File logFile = new File( projectDir, "log.txt" );
-            File logFileBackup = new File( projectDir, "mng-3221-a-log.txt" );
+            File logFileBackup = new File( logBackupDir, "mng-3221-a-log.txt" );
 
             logFile.renameTo( logFileBackup );
         }
@@ -57,6 +65,7 @@
         throws Exception
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3221" );
+        File logBackupDir = testDir.getAbsoluteFile().getParentFile();
 
         File pluginDir = new File( testDir, "plugin" );
         File projectDir = new File( testDir, "user" );
@@ -74,6 +83,11 @@
             verifier.resetStreams();
 
             verifier = new Verifier( projectDir.getAbsolutePath() );
+
+            List cliOptions = new ArrayList();
+            cliOptions.add( "-Pplugin" );
+            verifier.setCliOptions( cliOptions );
+
             verifier.executeGoal( "package" );
             verifier.verifyErrorFreeLog();
         }
@@ -85,7 +99,7 @@
             }
 
             File logFile = new File( projectDir, "log.txt" );
-            File logFileBackup = new File( projectDir, "mng-3221-b-log.txt" );
+            File logFileBackup = new File( logBackupDir, "mng-3221-b-log.txt" );
 
             logFile.renameTo( logFileBackup );
         }

Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3221/user/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3221/user/pom.xml?rev=643480&r1=643479&r2=643480&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3221/user/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng-3221/user/pom.xml Tue Apr  1 10:24:02 2008
@@ -34,33 +34,44 @@
     </dependency>
   </dependencies>
   
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>tests</groupId>
-        <artifactId>maven-forking-report-plugin</artifactId>
-        <version>1</version>
-      </plugin>
-    </plugins>
-  </reporting>
+  <profiles>
+    <profile>
+      <id>site</id>
+      
+      <reporting>
+        <plugins>
+          <plugin>
+            <groupId>tests</groupId>
+            <artifactId>maven-forking-report-plugin</artifactId>
+            <version>1</version>
+          </plugin>
+        </plugins>
+      </reporting>
+    </profile>
+    
+    <profile>
+      <id>plugin</id>
+      
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>tests</groupId>
+            <artifactId>maven-forking-test-plugin</artifactId>
+            <version>1</version>
+            <executions>
+              <execution>
+                <id>test</id>
+                <phase>validate</phase>
+                <goals>
+                  <goal>test</goal>
+                  <goal>test2</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
   
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>tests</groupId>
-        <artifactId>maven-forking-test-plugin</artifactId>
-        <version>1</version>
-        <executions>
-          <execution>
-            <id>test</id>
-            <phase>validate</phase>
-            <goals>
-              <goal>test</goal>
-              <goal>test2</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>