[#1207] warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...>

This message was posted to ruby-talk, but I didn't get responce from

22 messages 2003/07/01
[#1208] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/01

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1209] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/02

ts wrote:

[#1210] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/02

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1211] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1212] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/04

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1213] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1214] Re: warning in ruby extension eats memory — ts <decoux@...> 2003/07/04

>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:

[#1215] Re: warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...> 2003/07/04

ts wrote:

[#1237] FTP.new with block — Gavin Sinclair <gsinclair@...>

Hi,

22 messages 2003/07/19
[#1238] Re: [Patch] FTP.new with block — ts <decoux@...> 2003/07/19

>>>>> "G" == Gavin Sinclair <gsinclair@soyabean.com.au> writes:

[#1240] Re: [Patch] FTP.new with block — Mathieu Bouchard <matju@...> 2003/07/19

[#1297] Fix for Bug 1058 — Markus Walser <walser@...>

Hi,

16 messages 2003/07/25

Re: testunit, exit status and at_exit

From: "Nathaniel Talbott" <nathaniel@...>
Date: 2003-07-21 13:59:09 UTC
List: ruby-core #1263
Sean E. Russell [mailto:ser@germane-software.com] wrote:

> On Monday 21 July 2003 00:08, Dave Thomas wrote:
> > I'd really like TestUnit to be able to return an exit status when I 
> > run a test using
> 
> Ditto, and I'll even provide a use case.
> 
> If you have a software package that you make regular releases of, and a 
> semi-automated distribution mechanism, having an exit status on the unit 
> tests would allow the distribution mechanism to fail if any unit tests 
> failed.  This would help avoid distributing broken releases, by making 
> testing on staging machines easier.

I agree, too, but as Dave pointed out, my hands are tied at this point. I
think Test::Unit has used (and abused) exit blocks a lot more than was
perhaps ever intended (which, BTW, is Dave's fault in the first place - he
gave me the idea :-). It does seem useful, though, to be able to set the
exit status from an exit block.

For your case, Sean, there is a work around:

  if($0 == __FILE__)
    exit(1) unless(Test::Unit::UI::Console::TestRunner.run(suite).passed?)
  end

Unfortunately, in the current version under 1.8, it requires you to build
the suite yourself. Under the version in /rough/lib/testunit, you could just
do the following:

  exit(1) unless(Test::Unit::AutoRunner::run(__FILE__))

I may get it merged before the 1.8 release; if not, expect it for sure in
1.8.1.


Nathaniel

<:((><



In This Thread