I'm using an exec task, like you - except that I check for a string
instead of the return code (I wasn't sure if I could always count on a
non-zero return code when rake failed):
<target name="rails" unless="skip.rails">
<echo message="Running rails tests via rake ci task..."/>
<exec dir="checkout/${project.name}"
executable="rake"
output="checkout/${project.name}/log/rake-output.log"
outputproperty="rake.build.output"
>
<arg line="ci"/>
</exec>
<!-- check for error string 'rake aborted', and fail build if it
is found -->
<fail message="Rake failed, because 'rake aborted' string was
found in build output">
<condition>
<contains string="${build.output}" substring="rake aborted"
casesensitive="false"/>
</condition>
</fail>
<echo message="Rails tests via rake ci task completed successfully
(no string 'rake aborted' found)"/>
</target>
Then, I use the build artifact publisher in config.xml to copy all the
logs to the CruiseControl log dir - including the rake-output.log
created above:
<publishers>
<artifactspublisher dir="checkout/${project.name}/log"
dest="artifacts/${project.name}" />
</publishers>
This allows users to click the "Build Artifacts" link on the "Build
Results" tab to see the rake log, which says what passed or failed. I
also use this same approach for our other types of tests.
Kind of a hack, but it's working for now :) Let me know if you figure
out something cleaner.
-- Chad
On 6/26/06, Edward Summers <
ehs@...> wrote:
> So I saw some talk way back when about a RakeBuilder for
> CruiseControl...but I don't see any established way of integrating CC
> with Ruby. I can schedule an <exec> just fine, and can see when
> builds fail using the return code...but I'd like to be able to see
> which tests failed etc...
>
> Has anyone cooked up something for CC that groks test/unit output? If
> not does anyone have an opinion about how fruitful/easy it would be
> to create one?
>
> //Ed
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@...
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user