ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:44856] [ruby-trunk - Feature #5612][Open] bootstraptestをCtrl-Cで止まるようにしたい
@ 2011-11-11  2:07 Motohiro KOSAKI
  2011-11-11  4:13 ` [ruby-dev:44857] [ruby-trunk - Feature #5612] bootstraptestをCtrl-Cで止まるようにしたい Motohiro KOSAKI
  0 siblings, 1 reply; 2+ messages in thread
From: Motohiro KOSAKI @ 2011-11-11  2:07 UTC (permalink / raw
  To: ruby developers list


Issue #5612 has been reported by Motohiro KOSAKI.

----------------------------------------
Feature #5612: bootstraptestをCtrl-Cで止まるようにしたい
http://redmine.ruby-lang.org/issues/5612

Author: Motohiro KOSAKI
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


タイトルのとおりですが、make test が途中でやめたくなっても(テストを始めた所でバグに気づくとかよくありますよね?)
Ctrl-Cが効かなくてイライラします。

ようするにSEGVを 'E' にするために、握りつぶしてる箇所に手を入れるだけな気がするので、
以下のパッチで十分なように思うのですがどうでしょうか

diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index df58ca5..a34b55c 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -169,6 +169,8 @@ def show_progress(message = '')
     $stderr.puts if @verbose
     error faildesc, message
   end
+rescue Interrupt
+  raise Interrupt
 rescue Exception => err
   $stderr.print 'E'
   $stderr.puts if @verbose
@@ -342,6 +344,7 @@ def get_result_string(src, opt = '')
     begin
       `#{@ruby} -W0 #{opt} #{filename}`
     ensure
+      raise Interrupt if $?.signaled? && $?.termsig == :INT
       raise CoreDumpError, "core dumped" if $? and $?.coredump?
     end
   else


-- 
http://redmine.ruby-lang.org

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [ruby-dev:44857] [ruby-trunk - Feature #5612] bootstraptestをCtrl-Cで止まるようにしたい
  2011-11-11  2:07 [ruby-dev:44856] [ruby-trunk - Feature #5612][Open] bootstraptestをCtrl-Cで止まるようにしたい Motohiro KOSAKI
@ 2011-11-11  4:13 ` Motohiro KOSAKI
  0 siblings, 0 replies; 2+ messages in thread
From: Motohiro KOSAKI @ 2011-11-11  4:13 UTC (permalink / raw
  To: ruby developers list


Issue #5612 has been updated by Motohiro KOSAKI.


バグってた。こうかな?

diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index df58ca5..eaed292 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -169,6 +169,8 @@ def show_progress(message = '')
     $stderr.puts if @verbose
     error faildesc, message
   end
+rescue Interrupt
+  raise Interrupt
 rescue Exception => err
   $stderr.print 'E'
   $stderr.puts if @verbose
@@ -342,6 +344,7 @@ def get_result_string(src, opt = '')
     begin
       `#{@ruby} -W0 #{opt} #{filename}`
     ensure
+      raise Interrupt if $?.signaled? && $?.termsig == Signal.list["INT"]
       raise CoreDumpError, "core dumped" if $? and $?.coredump?
     end
   else
----------------------------------------
Feature #5612: bootstraptestをCtrl-Cで止まるようにしたい
http://redmine.ruby-lang.org/issues/5612

Author: Motohiro KOSAKI
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


タイトルのとおりですが、make test が途中でやめたくなっても(テストを始めた所でバグに気づくとかよくありますよね?)
Ctrl-Cが効かなくてイライラします。

ようするにSEGVを 'E' にするために、握りつぶしてる箇所に手を入れるだけな気がするので、
以下のパッチで十分なように思うのですがどうでしょうか

diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index df58ca5..a34b55c 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -169,6 +169,8 @@ def show_progress(message = '')
     $stderr.puts if @verbose
     error faildesc, message
   end
+rescue Interrupt
+  raise Interrupt
 rescue Exception => err
   $stderr.print 'E'
   $stderr.puts if @verbose
@@ -342,6 +344,7 @@ def get_result_string(src, opt = '')
     begin
       `#{@ruby} -W0 #{opt} #{filename}`
     ensure
+      raise Interrupt if $?.signaled? && $?.termsig == :INT
       raise CoreDumpError, "core dumped" if $? and $?.coredump?
     end
   else


-- 
http://redmine.ruby-lang.org

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-11  4:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11  2:07 [ruby-dev:44856] [ruby-trunk - Feature #5612][Open] bootstraptestをCtrl-Cで止まるようにしたい Motohiro KOSAKI
2011-11-11  4:13 ` [ruby-dev:44857] [ruby-trunk - Feature #5612] bootstraptestをCtrl-Cで止まるようにしたい Motohiro KOSAKI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).