Enable checkers on parallel test.

parallel test (`make test-all TESTS=-j8`) runs tests on specified
number of processes. However, some test checkers written in
`runner.rb` are not loaded. This fix enable these checkers on
parallel tests.

See also: https://github.com/ruby/ruby/pull/2508
This commit is contained in:
Koichi Sasada 2019-10-02 16:02:00 +09:00
Родитель 99d3043bd8
Коммит 84cbce3d88
3 изменённых файлов: 14 добавлений и 5 удалений

Просмотреть файл

@ -39,7 +39,11 @@ class RubyVM::InstructionSequence
end
opt = ENV['RUBY_ISEQ_DUMP_DEBUG']
if opt && caller.any?{|e| /test\/runner\.rb/ =~ e}
puts "RUBY_ISEQ_DUMP_DEBUG = #{opt}" if opt
end
CHECK_TO_A = 'to_a' == opt
CHECK_TO_BINARY = 'to_binary' == opt

Просмотреть файл

@ -2,6 +2,11 @@
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../.."
require 'test/unit'
require "profile_test_all" if ENV.key?('RUBY_TEST_ALL_PROFILE')
require "tracepointchecker"
require "zombie_hunter"
require "iseq_loader_checker"
module Test
module Unit
class Worker < Runner # :nodoc:

Просмотреть файл

@ -5,10 +5,10 @@ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require 'test/unit'
require_relative "../lib/profile_test_all" if ENV.key?('RUBY_TEST_ALL_PROFILE')
require_relative "../lib/tracepointchecker"
require_relative "../lib/zombie_hunter"
require_relative "../lib/iseq_loader_checker"
require "profile_test_all" if ENV.key?('RUBY_TEST_ALL_PROFILE')
require "tracepointchecker"
require "zombie_hunter"
require "iseq_loader_checker"
require_relative "../test-coverage.rb" if ENV.key?('COVERAGE')
case $0