mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
call GC.compact after each test.
RUBY_TEST_GC_COMPACT=1 enables GC.compact checker which calls GC.compact after each test.
This commit is contained in:
parent
51cc5a26df
commit
79eb5e1aca
2 changed files with 11 additions and 0 deletions
10
tool/lib/gc_compact_checker.rb
Normal file
10
tool/lib/gc_compact_checker.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module GCCompactChecker
|
||||
def after_teardown
|
||||
super
|
||||
GC.compact
|
||||
end
|
||||
end
|
||||
|
||||
Test::Unit::TestCase.include GCCompactChecker if ENV['RUBY_TEST_GC_COMPACT']
|
|
@ -9,6 +9,7 @@ require "profile_test_all" if ENV.key?('RUBY_TEST_ALL_PROFILE')
|
|||
require "tracepointchecker"
|
||||
require "zombie_hunter"
|
||||
require "iseq_loader_checker"
|
||||
require "gc_compact_checker"
|
||||
require_relative "../test-coverage.rb" if ENV.key?('COVERAGE')
|
||||
|
||||
case $0
|
||||
|
|
Loading…
Reference in a new issue