ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r432860 - /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
Date Sat, 19 Aug 2006 18:56:25 GMT
Author: bodewig
Date: Sat Aug 19 11:56:24 2006
New Revision: 432860

URL: http://svn.apache.org/viewvc?rev=432860&view=rev
Log:
make report file name prettier

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java?rev=432860&r1=432859&r2=432860&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java Sat
Aug 19 11:56:24 2006
@@ -33,6 +33,7 @@
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.taskdefs.LogOutputStream;
 import org.apache.tools.ant.types.EnumeratedAttribute;
+import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.TeeOutputStream;
 
 /**
@@ -178,13 +179,18 @@
         }
         if (logTo.getValue().equals(SendLogTo.FILE)
             || logTo.getValue().equals(SendLogTo.BOTH)) {
+
+            buildFile = FileUtils.getFileUtils()
+                .removeLeadingPath(getProject().getBaseDir(),
+                                   new File(buildFile));
             if (buildFile.length() > 0
                 && buildFile.charAt(0) == File.separatorChar) {
                 buildFile = buildFile.substring(1);
             }
             
-            String fileName =
-                buildFile.replace(File.separatorChar, '.') + ".txt";
+            String fileName = "TEST-" +
+                buildFile.replace(File.separatorChar, '.').replace(':', '.')
+                + ".txt";
             File file = toDir == null
                 ? getProject().resolveFile(fileName)
                 : new File(toDir, fileName);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message