Skip to content

Commit cd8336d

Browse files
committed
TestProcess: --disable-gems to disable rubygems_integration
1 parent 3af358f commit cd8336d

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
0008-Fix-IRBTestIRBHistory-tests.patch
99
0009-Dont-use-relative-path.patch
1010
0010-Fix-getcwd-ENOENT.patch
11+
0011-TestProcess-disable-gems-to-disable-rubygems_integra.patch

0 commit comments

Comments
 (0)