diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-07 10:55:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-07 10:55:24 +0000 |
commit | 9e6183976551f44b5f3e10b06f88b28e9d13f0a1 (patch) | |
tree | 28ad8502dfc1dcd9c7e3a63629ab533dec07cabd /test/ruby | |
parent | f84577ba84529594da6e46fe18a524a2524a8219 (diff) | |
download | ruby-9e6183976551f44b5f3e10b06f88b28e9d13f0a1.tar.gz |
Generalize r65594
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_process.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index fb8b4478c5..4e4a65778d 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -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) |