1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/test/unit.rb (Test::Unit::Mini#_run_suites): show the result

even when interrupted on the way.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-12-01 22:15:15 +00:00
parent 0e24a11b59
commit 64740adcff
2 changed files with 23 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu Dec 2 07:15:12 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb (Test::Unit::Mini#_run_suites): show the result
even when interrupted on the way.
Thu Dec 2 07:08:38 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/io/console/console.c (setattr): should retry on EINTR.

View file

@ -163,8 +163,24 @@ module Test
@@installed_at_exit = true
end
def run(*args)
super
def _run_suites suites, type
@interrupt = nil
result = []
suites.each {|suite|
begin
result << _run_suite(suite, type)
rescue Interrupt => e
@interrupt = e
break
end
}
result
end
def status(*args)
result = super
raise @interrupt if @interrupt
result
end
end
end