maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r709936 - /maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/
Date Sun, 02 Nov 2008 21:15:49 GMT
Author: bentmann
Date: Sun Nov  2 13:15:48 2008
New Revision: 709936

URL: http://svn.apache.org/viewvc?rev=709936&view=rev
Log:
o Set log file name up front to make sure the final location of a build log does not depend
on whether the test failed/passed

Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2339BadProjectInterpolationTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2695OfflinePluginSnapshotsTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3221InfiniteForkingTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3314OfflineSnapshotsTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3415JunkRepositoryMetadataTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3684BuildPluginParameterTest.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3703ExecutionProjectWithRelativePathsTest.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0069Test.java
Sun Nov  2 13:15:48 2008
@@ -42,11 +42,11 @@
             // phase 1: run build in online mode to fill local repo
             Verifier verifier = new Verifier( testDir.getAbsolutePath() );
             verifier.deleteArtifacts( "org.apache.maven.its.it0069" );
+            verifier.setLogFileName( "log1.txt" );
             verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile"
);
             verifier.assertFilePresent( "target/compile.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
         }
 
         {
@@ -56,11 +56,11 @@
             List cliOptions = new ArrayList();
             cliOptions.add( "-o" );
             verifier.setCliOptions( cliOptions );
+            verifier.setLogFileName( "log2.txt" );
             verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile"
);
             verifier.assertFilePresent( "target/compile.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
         }
 
         {
@@ -70,6 +70,7 @@
             List cliOptions = new ArrayList();
             cliOptions.add( "-o" );
             verifier.setCliOptions( cliOptions );
+            verifier.setLogFileName( "log3.txt" );
             try
             {
                 verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile"
);
@@ -80,7 +81,6 @@
                 // expected, should fail
             }
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log3.txt" ) );
         }
     }
 

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2339BadProjectInterpolationTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2339BadProjectInterpolationTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2339BadProjectInterpolationTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2339BadProjectInterpolationTest.java
Sun Nov  2 13:15:48 2008
@@ -64,6 +64,7 @@
 
         verifier = new Verifier( testDir.getAbsolutePath() );
 
+        verifier.setLogFileName( "log-pom-specified.txt" );
         verifier.executeGoal( "initialize" );
 
         assertTrue( "Touchfile using ${project.version} for ${version} does not exist.",
@@ -72,21 +73,17 @@
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File logFile = new File( testDir, "log.txt" );
-        logFile.renameTo( new File( testDir, "log-pom-specified.txt" ) );
-
         verifier = new Verifier( testDir.getAbsolutePath() );
 
         List cliOptions = new ArrayList();
         cliOptions.add( "-Dversion=2" );
         verifier.setCliOptions( cliOptions );
+        verifier.setLogFileName( "log-cli-specified.txt" );
         verifier.executeGoal( "initialize" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        logFile.renameTo( new File( testDir, "log-cli-specified.txt" ) );
-
         assertTrue( "Touchfile using CLI-specified ${version} does not exist.",
                     new File( testDir, "target/touch-2.txt" ).exists() );
     }

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2695OfflinePluginSnapshotsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2695OfflinePluginSnapshotsTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2695OfflinePluginSnapshotsTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2695OfflinePluginSnapshotsTest.java
Sun Nov  2 13:15:48 2008
@@ -20,7 +20,6 @@
  */
 
 import org.apache.maven.it.Verifier;
-import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
@@ -57,12 +56,12 @@
             verifier.deleteDirectory( "target" );
             verifier.deleteArtifacts( "org.apache.maven.its.mng2695" );
             verifier.setAutoclean( false );
+            verifier.setLogFileName( "log1.txt" );
             verifier.executeGoal( "validate" );
             verifier.assertFilePresent( "target/a.txt" );
             verifier.assertFilePresent( "target/b.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
         }
 
         {
@@ -71,12 +70,12 @@
             verifier.deleteDirectory( "target" );
             verifier.setAutoclean( false );
             verifier.setCliOptions( Collections.singletonList( "-o" ) );
+            verifier.setLogFileName( "log2.txt" );
             verifier.executeGoal( "validate" );
             verifier.assertFilePresent( "target/a.txt" );
             verifier.assertFilePresent( "target/b.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
         }
     }
 

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3221InfiniteForkingTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3221InfiniteForkingTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3221InfiniteForkingTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3221InfiniteForkingTest.java
Sun Nov  2 13:15:48 2008
@@ -51,6 +51,7 @@
 
             verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-report-plugin",
"1", "jar" );
 
+            verifier.setLogFileName( "mng-3221-a-log.txt" );
             verifier.executeGoal( "install" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
@@ -61,6 +62,7 @@
             cliOptions.add( "-Psite" );
             verifier.setCliOptions( cliOptions );
 
+            verifier.setLogFileName( "mng-3221-a-log.txt" );
             verifier.executeGoal( "site" );
             verifier.verifyErrorFreeLog();
         }
@@ -70,11 +72,6 @@
             {
                 verifier.resetStreams();
             }
-
-            File logFile = new File( projectDir, "log.txt" );
-            File logFileBackup = new File( logBackupDir, "mng-3221-a-log.txt" );
-
-            logFile.renameTo( logFileBackup );
         }
    }
 
@@ -95,6 +92,7 @@
 
             verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-test-plugin",
"1", "jar" );
 
+            verifier.setLogFileName( "mng-3221-b-log.txt" );
             verifier.executeGoal( "install" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
@@ -105,6 +103,7 @@
             cliOptions.add( "-Pplugin" );
             verifier.setCliOptions( cliOptions );
 
+            verifier.setLogFileName( "mng-3221-b-log.txt" );
             verifier.executeGoal( "package" );
             verifier.verifyErrorFreeLog();
         }
@@ -114,11 +113,6 @@
             {
                 verifier.resetStreams();
             }
-
-            File logFile = new File( projectDir, "log.txt" );
-            File logFileBackup = new File( logBackupDir, "mng-3221-b-log.txt" );
-
-            logFile.renameTo( logFileBackup );
         }
     }
 }

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3314OfflineSnapshotsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3314OfflineSnapshotsTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3314OfflineSnapshotsTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3314OfflineSnapshotsTest.java
Sun Nov  2 13:15:48 2008
@@ -56,22 +56,22 @@
             // phase 1: run build in online mode to fill local repo
             Verifier verifier = new Verifier( testDir.getAbsolutePath() );
             verifier.deleteArtifacts( "org.apache.maven.its.mng3314" );
+            verifier.setLogFileName( "log1.txt" );
             verifier.executeGoal( "validate" );
             verifier.assertFilePresent( "target/compile.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
         }
 
         {
             // phase 2: run build in offline mode to check it still passes
             Verifier verifier = new Verifier( testDir.getAbsolutePath() );
             verifier.setCliOptions( Collections.singletonList( "-o" ) );
+            verifier.setLogFileName( "log2.txt" );
             verifier.executeGoal( "validate" );
             verifier.assertFilePresent( "target/compile.txt" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
-            new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
         }
     }
 

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3415JunkRepositoryMetadataTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3415JunkRepositoryMetadataTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3415JunkRepositoryMetadataTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3415JunkRepositoryMetadataTest.java
Sun Nov  2 13:15:48 2008
@@ -112,26 +112,22 @@
         cliOptions.add( settings.getPath() );
 
         verifier.setCliOptions( cliOptions );
+        verifier.setLogFileName( "log-" + methodName + "-firstBuild.txt" );
         verifier.executeGoal( "package" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File firstLogFile = new File( testDir, "log-" + methodName + "-firstBuild.txt" );
-        logFile.renameTo( firstLogFile );
-
         assertMetadataMissing( localRepo );
 
         setupDummyDependency( testDir, localRepo, true );
 
+        verifier.setLogFileName( "log-" + methodName + "-secondBuild.txt" );
         verifier.executeGoal( "package" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File secondLogFile = new File( testDir, "log-" + methodName + "-secondBuild.txt"
);
-        logFile.renameTo( secondLogFile );
-
         assertMetadataMissing( localRepo );
     }
 
@@ -193,13 +189,13 @@
 
         verifier.setCliOptions( cliOptions );
 
+        verifier.setLogFileName( "log-" + methodName + "-firstBuild.txt" );
         verifier.executeGoal( "package" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File firstLogFile = new File( testDir, "log-" + methodName + "-firstBuild.txt" );
-        logFile.renameTo( firstLogFile );
+        File firstLogFile = new File( testDir, verifier.getLogFileName() );
 
         // FIXME: There really should be a better way than this!
         assertOutputLinePresent( verifier, firstLogFile, "snapshot tests:missing:1.0-SNAPSHOT:
checking for updates from testing-repo" );
@@ -209,13 +205,13 @@
 
         setupDummyDependency( testDir, localRepo, false );
 
+        verifier.setLogFileName( "log-" + methodName + "-secondBuild.txt" );
         verifier.executeGoal( "package" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File secondLogFile = new File( testDir, "log-" + methodName + "-secondBuild.txt"
);
-        logFile.renameTo( secondLogFile );
+        File secondLogFile = new File( testDir, verifier.getLogFileName() );
 
         // FIXME: There really should be a better way than this!
         assertOutputLineMissing( verifier, secondLogFile, "snapshot tests:missing:1.0-SNAPSHOT:
checking for updates from testing-repo" );

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3599useHttpProxyForWebDAVTest.java
Sun Nov  2 13:15:48 2008
@@ -166,13 +166,11 @@
         verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0",
"jar" );
         verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0",
"pom" );
         
+        verifier.setLogFileName( "logHttp.txt" );
         verifier.executeGoal( "compile" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File logFile = new File( testDir, "log.txt" );
-        logFile.renameTo( new File( testDir, "logHttp.txt" ) );
-
         verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency",
"1.0", "jar" );
         verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency",
"1.0", "jar",
                                          content + LS );
@@ -217,13 +215,11 @@
             verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0",
"jar" );
             verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0",
"pom" );
             
+            verifier.setLogFileName( "logDAV.txt" );
             verifier.executeGoal( "compile" );
             verifier.verifyErrorFreeLog();
             verifier.resetStreams();
 
-            File logFile = new File( testDir, "log.txt" );
-            logFile.renameTo( new File( testDir, "logDAV.txt" ) );
-
             verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency",
"1.0", "jar" );
             verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency",
"1.0", "jar",
                                              content + LS );

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3652UserAgentHeaderTest.java
Sun Nov  2 13:15:48 2008
@@ -109,12 +109,10 @@
         cliOptions.add( "-X" );
         verifier.setCliOptions( cliOptions );
 
+        verifier.setLogFileName( "log-unConfiguredHttp.txt" );
         verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-unConfiguredHttp.txt" ) );
 
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
@@ -159,6 +157,7 @@
         cliOptions.add( "-X" );
         verifier.setCliOptions( cliOptions );
 
+        verifier.setLogFileName( "log-unConfiguredDAV.txt" );
         verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
@@ -176,9 +175,6 @@
         String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
         String artifactVersion = (String) lines.get( 4 );
 
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-unConfiguredDAV.txt" ) );
-
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
 
@@ -211,6 +207,7 @@
         cliOptions.add( "-X" );
         verifier.setCliOptions( cliOptions );
 
+        verifier.setLogFileName( "log-configWithoutUserAgent.txt" );
         verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
@@ -228,9 +225,6 @@
         String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
         String artifactVersion = (String) lines.get( 4 );
 
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-configWithoutUserAgent.txt" ) );
-
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
 
@@ -263,13 +257,11 @@
         cliOptions.add( "-X" );
         verifier.setCliOptions( cliOptions );
 
+        verifier.setLogFileName( "log-configWithUserAgent.txt" );
         verifier.executeGoal( "validate" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
 
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-configWithUserAgent.txt" ) );
-
         String userAgent = this.userAgent;
         assertNotNull( userAgent );
 

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3684BuildPluginParameterTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3684BuildPluginParameterTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3684BuildPluginParameterTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3684BuildPluginParameterTest.java
Sun Nov  2 13:15:48 2008
@@ -52,20 +52,16 @@
         verifier.resetStreams();
         
         verifier = new Verifier( projectDir.getAbsolutePath() );
+        verifier.setLogFileName( "log-validate.txt" );
         verifier.executeGoal( "validate" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
         
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-validate.txt" ) );
-        
+        verifier.setLogFileName( "log-site.txt" );
         verifier.executeGoal( "site" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
-        logFile.renameTo( new File( projectDir, "log-site.txt" ) );
-        
     }
 }

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3703ExecutionProjectWithRelativePathsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3703ExecutionProjectWithRelativePathsTest.java?rev=709936&r1=709935&r2=709936&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3703ExecutionProjectWithRelativePathsTest.java
(original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3703ExecutionProjectWithRelativePathsTest.java
Sun Nov  2 13:15:48 2008
@@ -56,14 +56,12 @@
         verifier.resetStreams();
 
         verifier = new Verifier( projectDir.getAbsolutePath() );
+        verifier.setLogFileName( "log-mojo.txt" );
 
         verifier.executeGoal( "package" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-mojo.txt" ) );
     }
 
     public void testForkFromReport()
@@ -83,13 +81,11 @@
         verifier.resetStreams();
 
         verifier = new Verifier( projectDir.getAbsolutePath() );
+        verifier.setLogFileName( "log-report.txt" );
 
         verifier.executeGoal( "site" );
 
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        
-        File logFile = new File( projectDir, "log.txt" );
-        logFile.renameTo( new File( projectDir, "log-report.txt" ) );
     }
 }



Mime
View raw message