summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 03:32:57 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-29 03:32:57 +0000
commitd537ca1f847efc8298ae4aa1d699c68b48302195 (patch)
treec2d0204096f7bfd5d89c66a3fcb191d94d9046a3 /bootstraptest/runner.rb
parent2d6ad7e11875aca83123fb98aa82a3c4428ed941 (diff)
* bootstraptest/runner.rb (assert_normal_exit): new method.
* bootstraptest/test_knownbug.rb: add test for Marshal.load. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/runner.rb')
-rw-r--r--bootstraptest/runner.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 12acf29..6ee3ef3 100644
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -166,6 +166,32 @@ def assert_match(expected_pattern, testsrc, message = '')
}
end
+def assert_normal_exit(testsrc, message = '')
+ newtest
+ $stderr.puts "\##{@count} #{@location}" if @verbose
+ faildesc = nil
+ filename = make_srcfile(testsrc)
+ system("#{@ruby} -W0 #{filename}")
+ if $?.signaled?
+ signo = $?.termsig
+ signame = Signal.list.invert[signo]
+ sigdesc = "signal #{signo}"
+ if signame
+ sigdesc = "SIG#{signame} (#{sigdesc})"
+ end
+ faildesc = pretty(testsrc, "killed by #{sigdesc}", nil)
+ end
+ if !faildesc
+ $stderr.print '.'
+ else
+ $stderr.print 'F'
+ error faildesc, message
+ end
+rescue Exception => err
+ $stderr.print 'E'
+ error err.message, message
+end
+
def assert_finish(timeout_seconds, testsrc, message = '')
newtest
$stderr.puts "\##{@count} #{@location}" if @verbose