summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-11 11:51:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-11 11:51:39 +0000
commitf3fcd2e4a0b7680fa1ba813b8f7eb257cce41ec7 (patch)
tree9ec9aad1d90ceb6c1b5466f490f28380732d3c0c /bootstraptest/runner.rb
parent4532c0d81ef7aeb6d75d7bbe099682ef90165e29 (diff)
* io.c (rb_io_wait_readable, rb_io_wait_writable): check if the file
descriptor is closed. * thread.c (rb_thread_wait_fd_rw): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/runner.rb')
-rw-r--r--bootstraptest/runner.rb29
1 files changed, 17 insertions, 12 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 931fb46..080e7b1 100644
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -188,7 +188,7 @@ def assert_valid_syntax(testsrc, message = '')
}
end
-def assert_normal_exit(testsrc, message = '')
+def assert_normal_exit(testsrc, message = '', ignore_signals = nil)
newtest
$stderr.puts "\##{@count} #{@location}" if @verbose
faildesc = nil
@@ -205,28 +205,33 @@ def assert_normal_exit(testsrc, message = '')
if status.signaled?
signo = status.termsig
signame = Signal.list.invert[signo]
- sigdesc = "signal #{signo}"
- if signame
- sigdesc = "SIG#{signame} (#{sigdesc})"
- end
- faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
- stderr_log = File.read("assert_normal_exit_stderr.log")
- if !stderr_log.empty?
- faildesc << "\n" if /\n\z/ !~ faildesc
- stderr_log << "\n" if /\n\z/ !~ stderr_log
- stderr_log.gsub!(/^.*\n/) { '| ' + $& }
- faildesc << stderr_log
+ unless ignore_signals and ignore_signals.include?(signame)
+ sigdesc = "signal #{signo}"
+ if signame
+ sigdesc = "SIG#{signame} (#{sigdesc})"
+ end
+ faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
+ stderr_log = File.read("assert_normal_exit_stderr.log")
+ if !stderr_log.empty?
+ faildesc << "\n" if /\n\z/ !~ faildesc
+ stderr_log << "\n" if /\n\z/ !~ stderr_log
+ stderr_log.gsub!(/^.*\n/) { '| ' + $& }
+ faildesc << stderr_log
+ end
end
end
if !faildesc
$stderr.print '.'
+ true
else
$stderr.print 'F'
error faildesc, message
+ false
end
rescue Exception => err
$stderr.print 'E'
error err.message, message
+ false
end
def assert_finish(timeout_seconds, testsrc, message = '')