From 4beb1193936ff7ea65fbe81d4a8b096cc3067c96 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 20 Jul 2007 00:50:42 +0000 Subject: * bootstraptest/runner.rb (get_result_string): check $?.coredump? first. * bootstraptest/runner.rb (cleanup_coredump, check_coredump): see stackdump file too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/runner.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bootstraptest') diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 0e9d9d8ce0..0dfcae4359 100644 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -131,7 +131,11 @@ def get_result_string(src) File.open('bootstraptest.tmp.rb', 'w') {|f| f.puts "print(begin; #{src}; end)" } - `#{@ruby} bootstraptest.tmp.rb` + begin + `#{@ruby} -W0 bootstraptest.tmp.rb` + ensure + raise CoreDumpError, "core dumped" if $? and $?.coredump? + end else eval(src).to_s end @@ -159,12 +163,14 @@ end def cleanup_coredump FileUtils.rm_f 'core' FileUtils.rm_f Dir.glob('core.*') + FileUtils.rm_f @ruby+'.stackdump' if @ruby end class CoreDumpError < StandardError; end def check_coredump - if File.file?('core') or not Dir.glob('core.*').empty? + if File.file?('core') or not Dir.glob('core.*').empty? or + (@ruby and File.exist?(@ruby+'.stackdump')) raise CoreDumpError, "core dumped" end end -- cgit v1.2.3