|
| 1 | +From: Sorah Fukumori < [email protected]> |
| 2 | +Date: Thu, 29 Oct 2020 16:15:31 +0900 |
| 3 | +Subject: TestProcess: --disable-gems to disable rubygems_integration |
| 4 | + |
| 5 | +rubygems-integration might fail during build when the installed |
| 6 | +rubygems-integration is not the latest one. Some tests in TestProcess |
| 7 | +removes $DEBIAN_DISABLE_RUBYGEMS_INTEGRATION so rubygems-integration |
| 8 | +lets such test fail. |
| 9 | +--- |
| 10 | + test/ruby/test_process.rb | 6 +++--- |
| 11 | + 1 file changed, 3 insertions(+), 3 deletions(-) |
| 12 | + |
| 13 | +diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb |
| 14 | +index ab723c6..8776c99 100644 |
| 15 | +--- a/test/ruby/test_process.rb |
| 16 | ++++ b/test/ruby/test_process.rb |
| 17 | +@@ -278,7 +278,7 @@ class TestProcess < Test::Unit::TestCase |
| 18 | + end |
| 19 | + PREENVARG = ['-e', "%w[#{MANDATORY_ENVS.join(' ')}].each{|e|ENV.delete(e)}"] |
| 20 | + ENVARG = ['-e', 'ENV.each {|k,v| puts "#{k}=#{v}" }'] |
| 21 | +- ENVCOMMAND = [RUBY].concat(PREENVARG).concat(ENVARG) |
| 22 | ++ ENVCOMMAND = [RUBY, '--disable-gems'].concat(PREENVARG).concat(ENVARG) |
| 23 | + |
| 24 | + def test_execopts_env |
| 25 | + assert_raise(ArgumentError) { |
| 26 | +@@ -297,7 +297,7 @@ class TestProcess < Test::Unit::TestCase |
| 27 | + assert_equal(prog, e.message.sub(/.* - /, '')) |
| 28 | + } |
| 29 | + h = {} |
| 30 | +- cmd = [h, RUBY] |
| 31 | ++ cmd = [h, RUBY, '--disable-gems'] |
| 32 | + (ENV.keys + MANDATORY_ENVS).each do |k| |
| 33 | + case k |
| 34 | + when /\APATH\z/i |
| 35 | +@@ -383,7 +383,7 @@ class TestProcess < Test::Unit::TestCase |
| 36 | + with_tmpchdir do |d| |
| 37 | + open('test-script', 'w') do |f| |
| 38 | + ENVCOMMAND.each_with_index do |cmd, i| |
| 39 | +- next if i.zero? or cmd == "-e" |
| 40 | ++ next if i.zero? or cmd == "-e" or cmd == "--disable-gems" |
| 41 | + f.puts cmd |
| 42 | + end |
| 43 | + end |
0 commit comments