ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Aston" <pas...@bea.com>
Subject RE: [PATCH] JUnit task - forking only once for a batch
Date Sun, 28 Sep 2003 17:37:37 GMT
 > -----Original Message-----
 > From: Jim Dixon [mailto:jdd@dixons.org]
 > Sent: 28 September 2003 18:23
 > To: Philip Aston
 > Cc: dev@ant.apache.org
 > Subject: Re: [PATCH] JUnit task - forking only once for a batch
 > 
 > 
 > On Sun, 28 Sep 2003, Philip Aston wrote:
 > 
 > >  >  > On Tue, 23 Sep 2003, Philip Aston <paston@bea.com> wrote:
 > >  >  > > and would they like <batchtest fork="single"/>
 > >  >  >
 > >  >  > I'd like to see it, at least.
 > >  >  >
 > >  >
 > >  > OK, I'll cut a patch at the weekend.
 > >
 > > Patch and new file attached for consideration. Example usage:
 > >
 > >     <junit fork="true">
 > >       <batchtest singleProcess="false">
 > >         <formatter type="plain" usefile="false"/>
 > >
 > >           <fileset dir="${test-src.dir}">
 > > 	      <include name="**/*Tests.java"/>
 > >           </fileset>
 > >       </batchtest>
 > >     </junit>
 > >
 > >
 > > If its OK, I'm more than happy to update the docs.
 > 
 > Second request: how does this differ from fork="false"?

A single process is forked which is used to execute all the tests
defined by the batchtest.

In my environment, forking can take up to a second. This makes
the fork per test model of the unadulterated batch process very
expensive. We need to fork the tests because we want different
classpaths, library paths, system properties etc. to ANT. 

 > Are you passing a list of tests to the test runner or what?

Yes, a list of the tests is passed to the forked process through
a temporary file.

- Phil


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


Mime
View raw message