ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 46879] Enhance <batchtest> to support running tests from multiple source folders
Date Thu, 19 Mar 2009 19:10:15 GMT

--- Comment #2 from Boris Capitanu <>  2009-03-19 12:10:13 PST ---
Thanks for the fast reply.

I guess I'm not sure if what I'm trying to do is even supported.
(I think what I need is to be able to specify a resource collection comprised
of specific files across multiple folders... see details below)

Given the project organization described previously, I tried the following:


  <fileset dir=${basedir}" includes="src-*/test/**/*"/>

Result: this works in the sense that it does find all the proper files, but the
package names are wrong given that "dir" is set to "${basedir}".  So instead of
running  org.example.MainTest class, it tries to run

If there would've been a way to apply a <regexpmapper> to the results of the
fileset, I could've done something like

<regexpmapper from="^src-.+/test/(.+)$" to="\1"/>

to "strip out" the src-io/test from the files defined in the <fileset>


<path id="src.test.dirs">
   <dirset dir="${basedir}" includes="src-*/test" />

   <path refid="src.test.dirs"/>

Result: no error messages, but tests do not run -- also, don't have a way to
include only certain "*"-like patterns


<path id="src.test.dirs">
   <dirset dir="${basedir}" includes="src-*/test" />

   <fileset refid="src.test.dirs" includes="**/*" />

Result: errors - twofold: 
  1. It complains that: "You must not specify more than one attribute when
using refid"
  2. If I remove the "includes=..." attribute, it still complains that
src.test.dirs is not a fileset

In conclusion, I'm not sure if what I'm trying to do is even possible.
Of course I could define a number of <fileset>s inside the <batchtest> to
reference each individual src-*/test location, but that means that whenever
more source folders are created, the build.xml file would need to be updated.

Any ideas?

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message