You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Berin Loritsch <bl...@apache.org> on 2001/08/06 19:16:51 UTC

task

I am trying to use the <junit> task with the embedded
<batchtest> element.  The problem is that my includes
work, but my excludes don't.

    <junit fork="true" printsummary="yes" dir="${build.reports}">
      <formatter type="xml"/>
      <classpath refid="test.class.path"/>
      <batchtest todir="${build.reports}">
        <fileset dir="${build.classes}">
          <exclude name="**/excalibur/test/*"/>
          <exclude name="**$*"/>
          <include name="**/test/*"/>
        </fileset>
      </batchtest>
    </junit>

I am trying to exclude internal classes from the batch testing,
as well as one specific test.  It finds all the test classes and the
internal classes, and then tries to execute tests on all of them.

Re: task

Posted by Berin Loritsch <bl...@apache.org>.
Peter Donald wrote:
> 
> On Tue,  7 Aug 2001 03:16, Berin Loritsch wrote:
> > I am trying to use the <junit> task with the embedded
> > <batchtest> element.  The problem is that my includes
> > work, but my excludes don't.


> >           <exclude name="**$*"/>
> 
> Should be $$ rather than just $

Please document this.  The Wildcard matching algorithm is
not well documented--so unless you are familiar with the
code you don't know about these things.

> So it finds the classes in **/excalibur/test/* ? Damn thats a bug. Can you
> make above change and if error still occurs I will try to fix it.

I had completely changed the matches to that only the includes section
was needed.

Re: task

Posted by Peter Donald <do...@apache.org>.
On Tue,  7 Aug 2001 03:16, Berin Loritsch wrote:
> I am trying to use the <junit> task with the embedded
> <batchtest> element.  The problem is that my includes
> work, but my excludes don't.
>
>     <junit fork="true" printsummary="yes" dir="${build.reports}">
>       <formatter type="xml"/>
>       <classpath refid="test.class.path"/>
>       <batchtest todir="${build.reports}">
>         <fileset dir="${build.classes}">
>           <exclude name="**/excalibur/test/*"/>
>           <exclude name="**$*"/>

Should be $$ rather than just $

>           <include name="**/test/*"/>
>         </fileset>
>       </batchtest>
>     </junit>
>
> I am trying to exclude internal classes from the batch testing,
> as well as one specific test.  It finds all the test classes and the
> internal classes, and then tries to execute tests on all of them.

So it finds the classes in **/excalibur/test/* ? Damn thats a bug. Can you 
make above change and if error still occurs I will try to fix it.
 
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*