зеркало из https://github.com/github/ruby.git
* bootstraptest/runner.rb (assert_normal_exit): hide stderr output
when success. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8ec04b569e
Коммит
2dc5f35a3a
|
@ -1,3 +1,8 @@
|
|||
Wed Jun 11 12:15:17 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bootstraptest/runner.rb (assert_normal_exit): hide stderr output
|
||||
when success.
|
||||
|
||||
Wed Jun 11 09:26:43 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* common.mk (encs): need to pass miniruby path for windows.
|
||||
|
|
|
@ -193,15 +193,30 @@ def assert_normal_exit(testsrc, message = '')
|
|||
$stderr.puts "\##{@count} #{@location}" if @verbose
|
||||
faildesc = nil
|
||||
filename = make_srcfile(testsrc)
|
||||
`#{@ruby} -W0 #{filename}`
|
||||
if $?.signaled?
|
||||
signo = $?.termsig
|
||||
old_stderr = $stderr.dup
|
||||
begin
|
||||
$stderr.reopen("assert_normal_exit_stderr.log", "w")
|
||||
`#{@ruby} -W0 #{filename}`
|
||||
status = $?
|
||||
ensure
|
||||
$stderr.reopen(old_stderr)
|
||||
old_stderr.close
|
||||
end
|
||||
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
|
||||
end
|
||||
end
|
||||
if !faildesc
|
||||
$stderr.print '.'
|
||||
|
|
Загрузка…
Ссылка в новой задаче