2004-11-20 16:58:20 +03:00
|
|
|
require 'rbconfig'
|
2008-10-15 08:16:28 +04:00
|
|
|
|
2012-06-08 11:19:38 +04:00
|
|
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
2011-03-10 01:32:29 +03:00
|
|
|
$LOAD_PATH << src_testdir
|
2014-05-17 10:26:51 +04:00
|
|
|
$LOAD_PATH.unshift "#{src_testdir}/lib"
|
|
|
|
|
|
|
|
require 'test/unit'
|
|
|
|
|
2011-07-09 03:39:42 +04:00
|
|
|
module Gem
|
|
|
|
end
|
2011-03-22 04:59:18 +03:00
|
|
|
class Gem::TestCase < MiniTest::Unit::TestCase
|
|
|
|
@@project_dir = File.dirname($LOAD_PATH.last)
|
|
|
|
end
|
2008-10-19 19:59:35 +04:00
|
|
|
|
2012-12-01 04:34:01 +04:00
|
|
|
ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
|
2012-07-12 07:32:28 +04:00
|
|
|
|
2013-08-16 12:46:21 +04:00
|
|
|
require_relative 'profile_test_all' if ENV.has_key?('RUBY_TEST_ALL_PROFILE')
|
2010-10-29 18:35:53 +04:00
|
|
|
|
2013-06-19 11:47:07 +04:00
|
|
|
module Test::Unit
|
|
|
|
module ZombieHunter
|
|
|
|
def after_teardown
|
|
|
|
super
|
|
|
|
assert_empty(Process.waitall)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
class TestCase
|
|
|
|
include ZombieHunter
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-07-30 10:52:48 +04:00
|
|
|
begin
|
|
|
|
exit Test::Unit::AutoRunner.run(true, src_testdir)
|
2013-07-30 16:30:30 +04:00
|
|
|
rescue NoMemoryError
|
2013-07-31 11:07:03 +04:00
|
|
|
system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
|
2013-08-01 21:11:27 +04: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 10:52:48 +04:00
|
|
|
raise
|
|
|
|
end
|