maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r620666 - /maven/surefire/trunk/surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/FileOutputConsumerProxyTest.java
Date Mon, 11 Feb 2008 23:24:24 GMT
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"
)



Mime
View raw message