mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
7476be4def
If you enable this checker (remove `#' in test/runner.rb), you can see comparison results between an original iseq disassembed result and dumped and loaded iseq disassembed result. There are several bugs around there, because of inexact stack depth calculation. Now, I leave these bugs because they are not critical and difficult to solve completely. * test/runner.rb: require test/lib/iseq_loader_checker.rb but disabled at default (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
44 lines
1.2 KiB
Ruby
44 lines
1.2 KiB
Ruby
require 'rbconfig'
|
|
|
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
|
$LOAD_PATH << src_testdir
|
|
$LOAD_PATH.unshift "#{src_testdir}/lib"
|
|
|
|
# Get bundled gems on load path
|
|
Dir.glob("#{src_testdir}/../gems/*/*.gemspec")
|
|
.reject {|f| f =~ /minitest|test-unit|power_assert/ }
|
|
.map {|f| $LOAD_PATH.unshift File.join(File.dirname(f), "lib") }
|
|
|
|
require 'test/unit'
|
|
|
|
module Gem
|
|
end
|
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
|
@@project_dir = File.dirname($LOAD_PATH.last)
|
|
end
|
|
|
|
ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
|
|
|
|
require_relative 'lib/profile_test_all' if ENV.has_key?('RUBY_TEST_ALL_PROFILE')
|
|
require_relative 'lib/tracepointchecker'
|
|
require_relative 'lib/zombie_hunter'
|
|
# require_relative 'lib/iseq_loader_checker'
|
|
|
|
if ENV['COVERAGE']
|
|
%w[doclie simplecov-html simplecov].each do |f|
|
|
$LOAD_PATH.unshift "#{src_testdir}/../coverage/#{f}/lib"
|
|
end
|
|
|
|
require 'simplecov'
|
|
SimpleCov.start do
|
|
add_filter "/test/"
|
|
end
|
|
end
|
|
|
|
begin
|
|
exit Test::Unit::AutoRunner.run(true, src_testdir)
|
|
rescue NoMemoryError
|
|
system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
|
|
system("ps x -opid,args,%cpu,%mem,nlwp,rss,vsz,wchan,stat,start,time,etime,blocked,caught,ignored,pending,f") if File.exist?("/bin/ps")
|
|
raise
|
|
end
|