Allen Riddle
2007-Jul-02 20:16 UTC
[Cruisecontrolrb-users] Build isn''t failing on "errors"
Hello, I''ve set up CruiseControl.rb for our Rails app. The build is not failing even though the unit test in question actually contains a Ruby error (wrong number of arguments passed to a method). This doesn''t come up as a "failure", but instead as an "error" when the unit test runs. Shouldn''t CC.rb fail the build because of this? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070702/67c467e9/attachment.html
Jeremy Stell-Smith
2007-Jul-03 04:39 UTC
[Cruisecontrolrb-users] Build isn''t failing on "errors"
if your regular failures will fail the build, then it sounds like this might be a problem w/ test/unit or ruby. not sure what we could do about it if it was. can you reproduce the problem w/ a simple example? Jeremy On 7/2/07, Allen Riddle <ariddle at sunbridgecapital.com> wrote:> > Hello, I''ve set up CruiseControl.rb for our Rails app. The build is not > failing even though the unit test in question actually contains a Ruby error > (wrong number of arguments passed to a method). This doesn''t come up as a > "failure", but instead as an "error" when the unit test runs. Shouldn''t > CC.rb fail the build because of this? Thanks. > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070702/ba676a77/attachment.html
Allen Riddle
2007-Jul-06 15:23 UTC
[Cruisecontrolrb-users] Build isn''t failing on "errors"
Thanks Tim. After doing some digging, it turns out that Ruby 1.8.6 doesn''t return an error code if there is an exception raised in an at_exit block. This is exactly what Test::Unit does. So does the rake task you created work around this? Thanks for your help. ________________________________ From: Tim Lucas [mailto:t.lucas at gmail.com] Sent: Tuesday, July 03, 2007 12:29 AM To: Jeremy Stell-Smith Cc: Allen Riddle; cruisecontrolrb-users at rubyforge.org Subject: Re: [Cruisecontrolrb-users] Build isn''t failing on "errors" On 03/07/2007, at 2:39 PM, Jeremy Stell-Smith wrote: On 7/2/07, Allen Riddle <ariddle at sunbridgecapital.com> wrote: Hello, I''ve set up CruiseControl.rb for our Rails app. The build is not failing even though the unit test in question actually contains a Ruby error (wrong number of arguments passed to a method). This doesn''t come up as a "failure", but instead as an "error" when the unit test runs. Shouldn''t CC.rb fail the build because of this? Thanks. if your regular failures will fail the build, then it sounds like this might be a problem w/ test/unit or ruby. The build must return an error exit code. If it does not, then CC.rb does not consider it failed. If it''s within your own rake task you simply need to ''raise'': http://pastie.textmate.org/75604 -- tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070706/49c7cb7e/attachment.html
Alex helped us with this same issue. We ended up going with his advice, and installing Ruby 1.8.5 for use by CC. It works. On 7/6/07, Allen Riddle <ariddle at sunbridgecapital.com> wrote:> > Thanks Tim. After doing some digging, it turns out that Ruby 1.8.6doesn''t return an error code if there is an exception raised in an at_exit > block. This is exactly what Test::Unit does. So does the rake task you > created work around this? Thanks for your help. > > > ------------------------------ > > *From:* Tim Lucas [mailto:t.lucas at gmail.com] > *Sent:* Tuesday, July 03, 2007 12:29 AM > *To:* Jeremy Stell-Smith > *Cc:* Allen Riddle; cruisecontrolrb-users at rubyforge.org > *Subject:* Re: [Cruisecontrolrb-users] Build isn''t failing on "errors" > > > > On 03/07/2007, at 2:39 PM, Jeremy Stell-Smith wrote: > > On 7/2/07, *Allen Riddle* <ariddle at sunbridgecapital.com> wrote: > > Hello, I''ve set up CruiseControl.rb for our Rails app. The build is not > failing even though the unit test in question actually contains a Ruby error > (wrong number of arguments passed to a method). This doesn''t come up as a > "failure", but instead as an "error" when the unit test runs. Shouldn''t > CC.rb fail the build because of this? Thanks. > > > > if your regular failures will fail the build, then it sounds like this > might be a problem w/ test/unit or ruby. > > > > The build must return an error exit code. If it does not, then CC.rb does > not consider it failed. > > > > If it''s within your own rake task you simply need to ''raise'': > > http://pastie.textmate.org/75604 > > > > -- tim > > > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cruisecontrolrb-users/attachments/20070706/753d2da0/attachment-0001.html