ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erskine, Chris" <chris.ersk...@eds.com>
Subject RE: Junit and mail from ant
Date Sat, 25 Sep 2004 15:38:03 GMT
Looks like you are looking for a build tool like cruise control or anthill

Chris Erskine
 
EDS Consulting Services
F5-EDS-001
2424 Garden of the Gods Rd
Colorado Springs, CO  80919
 
Phone: 719-535-6064
 
Phone:
mailto:chris.erskine@eds.com

-----Original Message-----
From: Eric Carlson [mailto:eric.carlson@group-technical.com] 
Sent: Saturday, September 25, 2004 3:26 AM
To: user@ant.apache.org
Subject: Junit and mail from ant

Hi, I would like to improve my overnight build and unit test process
which runs as an ant task on linux. It's a combination of linux batch
*.sh files which perform pre and post processing of the source, which
is also extracted by the *.sh batch from subversion to a fresh dir
each night. The bottom line is I know about being able to invoke JUnit
and <mail> from within ant but I'm constrained by these pre and post
processing tasks to such an extent that I can't, I am stuck with a
sequence similar to this:

(in sh)
extract tree to fresh dir (including build.xml) > build.log
extract test tree to fresh dir (including build.xml) > test.log
ant build.xml >> build log
java junit.jar junit.textui.TestRunner ... >> test.log
sendmail $to < build.log
sendmail $to < test.log

This works, but the email could be better. If the build fails, I want
to know about it in the subject (in fact I'd like the option to send
it in this event to more than 1 email address for cellphone altrts).
Also, I'd like to capture the last line from the ant task and put that
as a subject, so it would say "187/187 tests passed" for example. In
my scheme above I am too late in both instances, you can see the log
contains the source extract too which is important. I can either get
fancy with sh and post process the logs to create a subject or, ask
here if there is a way to capture just the output of the tasks in say
global vars. I could then use $testsinvoked/$testspassed as a subject
and $buildstatus for the build (that being boolean). 

Thanks.

-- ec


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

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


Mime
View raw message