You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by df...@apache.org on 2008/02/12 00:24:24 UTC

svn commit: r620666 - /maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java

Author: dfabulich
Date: Mon Feb 11 15:24:22 2008
New Revision: 620666

URL: http://svn.apache.org/viewvc?rev=620666&view=rev
Log:
Don't dump output files in USER_DIR; put them in the target directory instead.

Modified:
    maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java

Modified: maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java?rev=620666&r1=620665&r2=620666&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java (original)
+++ maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java Mon Feb 11 15:24:22 2008
@@ -38,18 +38,22 @@
 {
 
     private static final String USER_DIR = System.getProperty( "user.dir" );
+    File targetDir;
 
     protected void setUp()
         throws Exception
     {
         super.setUp();
-        setOutputConsumer( new FileOutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy() ) );
+        targetDir = new File ( USER_DIR, "target" );
+        if ( !targetDir.exists() ) targetDir = new File( USER_DIR );
+        setOutputConsumer( new FileOutputConsumerProxy( (OutputConsumer) getOutputConsumerMock().proxy(), targetDir ) );
     }
 
     public void testConsumeOutputLine()
         throws Exception
     {
-        File reportFile = new File( USER_DIR, getReportEntry().getName() + "-output.txt" );
+        
+        File reportFile = new File( targetDir, getReportEntry().getName() + "-output.txt" );
         reportFile.delete();
 
         getOutputConsumerMock().expects( new InvokeOnceMatcher() ).method( "testSetStarting" )