Project

General

Profile

Actions

Feature #5612

closed

bootstraptestをCtrl-Cで止まるようにしたい

Added by kosaki (Motohiro KOSAKI) about 13 years ago. Updated about 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:44856]

Description

タイトルのとおりですが、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

Updated by kosaki (Motohiro KOSAKI) about 13 years ago

バグってた。こうかな?

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
Actions #2

Updated by kosaki (Motohiro KOSAKI) about 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r33722.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


Actions

Also available in: Atom PDF

Like0
Like0Like0