зеркало из https://github.com/github/ruby.git
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:
Родитель
99d3043bd8
Коммит
84cbce3d88
|
@ -39,7 +39,11 @@ class RubyVM::InstructionSequence
|
|||
end
|
||||
|
||||
opt = ENV['RUBY_ISEQ_DUMP_DEBUG']
|
||||
puts "RUBY_ISEQ_DUMP_DEBUG = #{opt}" if opt
|
||||
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче