summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-20 00:50:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-20 00:50:42 +0000
commit4beb1193936ff7ea65fbe81d4a8b096cc3067c96 (patch)
tree647161bc4800df45fcd28ad85d4fb6c843e77e5c /bootstraptest
parent863e7e95f2a811530df1f5bc8400d098c35cce45 (diff)
* 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
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/runner.rb10
1 files changed, 8 insertions, 2 deletions
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