make report file name prettier

git-svn-id: https://svn.apache.org/repos/asf/ant/antlibs/antunit/trunk@432860 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/org/apache/ant/antunit/PlainAntUnitListener.java b/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
index c12fc88..4f7d3bb 100644
--- a/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
+++ b/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
@@ -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);