Project

General

Profile

Bug #3305

test_processのMANDATORY_ENVS

Added by tarui (Masaya Tarui) about 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 1.9.2dev (2010-05-16 revision 27850) [i386-mswin32_90]
Backport:
[ruby-dev:41332]

Description

=begin
現状だと以下のようになります。OSはWindowsXP SP3です。

c:\bin\ruby.exe test\ruby\test_process.rb
(snip)
2) Failure:
test_execopts_env(TestProcess) [test/ruby/test_process.rb:252]:
<"PATH\n"> expected but was
<"">.
(snip)
8) Failure:
test_execopts_unsetenv_others(TestProcess) [test/ruby/test_process.rb:290]:
<"A=B\n"> expected but was
<"">.
(snip)
56 tests, 132 assertions, 2 failures, 0 errors, 8 skips

どうやら、起動時にSystemRootが必要なようで以下で直ります。

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb (リビジョン 27851)
+++ test/ruby/test_process.rb (作業コピー)
@@ -222,7 +222,7 @@
when /linux/
MANDATORY_ENVS << 'LD_PRELOAD'
when /mswin|mingw/

  • MANDATORY_ENVS.concat(%w[HOME USER TMPDIR])
  • MANDATORY_ENVS.concat(%w[HOME USER TMPDIR SystemRoot]) end if e = RbConfig::CONFIG['LIBPATHENV'] MANDATORY_ENVS << e

結果、

c:\bin\ruby.exe test\ruby\test_process.rb
(snip)
56 tests, 143 assertions, 0 failures, 0 errors, 8 skips
=end

Also available in: Atom PDF