mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Generalize r65594
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f84577ba84
commit
9e61839765
1 changed files with 4 additions and 2 deletions
|
@ -263,7 +263,7 @@ class TestProcess < Test::Unit::TestCase
|
|||
}
|
||||
end
|
||||
|
||||
MANDATORY_ENVS = %w[RUBYLIB]
|
||||
MANDATORY_ENVS = %w[RUBYLIB MJIT_SEARCH_BUILD_DIR]
|
||||
case RbConfig::CONFIG['target_os']
|
||||
when /linux/
|
||||
MANDATORY_ENVS << 'LD_PRELOAD'
|
||||
|
@ -271,11 +271,13 @@ class TestProcess < Test::Unit::TestCase
|
|||
MANDATORY_ENVS.concat(%w[HOME USER TMPDIR])
|
||||
when /darwin/
|
||||
MANDATORY_ENVS.concat(ENV.keys.grep(/\A__CF_/))
|
||||
MANDATORY_ENVS.concat(['MJIT_SEARCH_BUILD_DIR', 'DYLD_INSERT_LIBRARIES']) # set on tool/runruby.rb (ruby-runner.c)
|
||||
end
|
||||
if e = RbConfig::CONFIG['LIBPATHENV']
|
||||
MANDATORY_ENVS << e
|
||||
end
|
||||
if e = RbConfig::CONFIG['PRELOADENV'] and !e.empty?
|
||||
MANDATORY_ENVS << e
|
||||
end
|
||||
PREENVARG = ['-e', "%w[#{MANDATORY_ENVS.join(' ')}].each{|e|ENV.delete(e)}"]
|
||||
ENVARG = ['-e', 'ENV.each {|k,v| puts "#{k}=#{v}" }']
|
||||
ENVCOMMAND = [RUBY].concat(PREENVARG).concat(ENVARG)
|
||||
|
|
Loading…
Reference in a new issue