diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-20 00:50:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-20 00:50:42 +0000 |
commit | c52008045ef58f8f51311ef435f5666a6da47afb (patch) | |
tree | 647161bc4800df45fcd28ad85d4fb6c843e77e5c /bootstraptest | |
parent | 7e04022eb98c946f62b2af93a5a0f89392f1a23d (diff) | |
download | ruby-c52008045ef58f8f51311ef435f5666a6da47afb.tar.gz ruby-c52008045ef58f8f51311ef435f5666a6da47afb.tar.xz ruby-c52008045ef58f8f51311ef435f5666a6da47afb.zip |
* bootstraptest/runner.rb (get_result_string): check $?.coredump?
first.
* bootstraptest/runner.rb (cleanup_coredump, check_coredump): see
stackdump file too.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/runner.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 0e9d9d8ce..0dfcae435 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 |