ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46879] Enhance <batchtest> to support running tests from multiple source folders
Date Fri, 20 Mar 2009 16:29:15 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46879





--- Comment #7 from Boris Capitanu <borice@hotmail.com>  2009-03-20 09:29:13 PST ---
I discovered that since I'm compiling all test cases into the same destination
folder, I can forego using the <mappedresources> and do the following:

<batchtest>
   <fileset dir="${build.test.dir}" includes="**/*Test.class"/>
</batchtest>


where build.test.dir is populated as follows:

       <javac destdir="${build.test.dir}" debug="on">
            <src refid="src.test.dirs"/>
            <classpath>
                <path refid="meandre.core.classpath"/>
                <path refid="test.classpath"/>
                <pathelement location="${build.src.dir}"/>
            </classpath>
        </javac>

This is as simple as it can get, and works in the current Ant releases.

I didn't know that <batchtest> uses the enclosed resource collection (in my
case the <fileset>) only to determine the class names of the unit tests it
needs to run (and these class names are derived from the file names returned by
the fileset).   I thought that the fileset needed to reference the actual java
source code of the unit tests, but it doesn't.  

Thanks again for all your help.  The <mappedresources> is still something I can
find a lot of uses for - so I can't wait for Ant 1.8 :-)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message