2015-12-16 05:07:31 +00:00
|
|
|
# frozen_string_literal: false
|
2004-11-20 13:58:20 +00:00
|
|
|
require 'rbconfig'
|
2008-10-15 04:16:28 +00:00
|
|
|
|
2012-06-08 07:19:38 +00:00
|
|
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
2011-03-09 22:32:29 +00:00
|
|
|
$LOAD_PATH << src_testdir
|
2014-05-17 06:26:51 +00:00
|
|
|
$LOAD_PATH.unshift "#{src_testdir}/lib"
|
|
|
|
|
2015-04-04 12:31:31 +00:00
|
|
|
# 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") }
|
|
|
|
|
2014-05-17 06:26:51 +00:00
|
|
|
require 'test/unit'
|
|
|
|
|
2011-07-08 23:39:42 +00:00
|
|
|
module Gem
|
|
|
|
end
|
2011-03-22 01:59:18 +00:00
|
|
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
|
|
|
@@project_dir = File.dirname($LOAD_PATH.last)
|
|
|
|
end
|
2008-10-19 15:59:35 +00:00
|
|
|
|
2012-12-01 00:34:01 +00:00
|
|
|
ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
|
2012-07-12 03:32:28 +00:00
|
|
|
|
2014-06-26 09:16:56 +00:00
|
|
|
require_relative 'lib/profile_test_all' if ENV.has_key?('RUBY_TEST_ALL_PROFILE')
|
2014-06-20 08:22:09 +00:00
|
|
|
require_relative 'lib/tracepointchecker'
|
2015-11-06 11:18:30 +00:00
|
|
|
require_relative 'lib/zombie_hunter'
|
2015-12-08 13:58:50 +00:00
|
|
|
require_relative 'lib/iseq_loader_checker'
|
2013-06-19 07:47:07 +00:00
|
|
|
|
2014-09-02 07:59:18 +00:00
|
|
|
if ENV['COVERAGE']
|
2017-09-07 17:45:34 +00:00
|
|
|
require_relative "../tool/test-coverage.rb"
|
2014-09-02 07:59:18 +00:00
|
|
|
end
|
|
|
|
|
2013-07-30 06:52:48 +00:00
|
|
|
begin
|
|
|
|
exit Test::Unit::AutoRunner.run(true, src_testdir)
|
2013-07-30 12:30:30 +00:00
|
|
|
rescue NoMemoryError
|
2013-07-31 07:07:03 +00:00
|
|
|
system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
|
2013-08-01 17:11:27 +00:00
|
|
|
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")
|
2013-07-30 06:52:48 +00:00
|
|
|
raise
|
|
|
|
end
|