ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Echlin, Robert" <Robert.Ech...@windriver.com>
Subject RE: Junit report for multiple projects
Date Mon, 20 Jun 2011 14:21:54 GMT
You are running separate copies of ant for each of the junit tests.
Instead, run them all in the same Ant invocation, and make the "mainbuild" target depend on
all of them.

<target name="mainbuild" depends="junit-1,junit-2,junit-3">

The above line replaces the first  4 nonblank lines (shown below) from your example.

> <target name="mainbuild">
>    <antcall target="junit-1">
>    <antcall target="junit-2">
>    <antcall target="junit-3">
Rob


> -----Original Message-----
> From: kasim ahmed [mailto:mail2kasim@googlemail.com]
> Sent: Sunday, June 19, 2011 5:25 AM
> To: Ant Users List
> Subject: Junit report for multiple projects
> 
> i have ant target which invokes concurrently other 3 projects ant build target
> for junit. this build target executes all three projects even though any one of
> the sub project build fails. Problem here is, if any one of sub project build
> fails error message should display and junit report should generate, but it is
> not happening, how can i solve it?
> 
> 
> 
> <target name="mainbuild">
> 
> 
> 
>  <antcall target="junit-1">
> 
>  <antcall target="junit-2">
> 
>  <antcall target="junit-3">
> 
> 
> 
> <junitreport todir="./reports">
> 
>   <fileset dir="./project-1/reports">
> 
>     <include name="TEST-*.xml"/>
> 
>   </fileset>
> 
>   <fileset dir="./project-2/reports">
> 
>     <include name="TEST-*.xml"/>
> 
>   </fileset>
> 
>   <fileset dir="./project-3/reports">
> 
>     <include name="TEST-*.xml"/>
> 
>   </fileset>
> 
>   <report format="frames" todir="./report/html"/>
> 
> </junitreport>
> 
> </target>
> 
> 
> 
> <target name="junit-1">
> 
> <!-- generate xml files-->
> 
> </target>
> 
> 
> 
> <target name="junit-2">
> 
> <!-- generate xml files-->
> 
> </target>
> 
> 
> 
> <target name="junit-3">
> 
> <!-- generate xml files-->
> 
> </target>
> 
> 
> 
> 1) main build invokes 3 project, even though build fail in any one of the
> subproject, build successful message displays at the end, it should not
> happen
> 
> 2) if anyone of the subproject build fails, build report should generate, so
> that developer can analyse further on his failure.

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


Mime
View raw message