ruby-changes:46991
From: nobu <ko1@a...>
Date: Sat, 17 Jun 2017 09:18:38 +0900 (JST)
Subject: [ruby-changes:46991] nobu:r59106 (trunk): capi/spec_helper.rb: pass jobserver fds
nobu 2017-06-17 09:18:33 +0900 (Sat, 17 Jun 2017) New Revision: 59106 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59106 Log: capi/spec_helper.rb: pass jobserver fds * spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#multi_exec): do not close GNU make jobserver auth fds. * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): ditto. Modified files: trunk/spec/mspec/lib/mspec/commands/mspec.rb trunk/spec/rubyspec/optional/capi/spec_helper.rb Index: spec/mspec/lib/mspec/commands/mspec.rb =================================================================== --- spec/mspec/lib/mspec/commands/mspec.rb (revision 59105) +++ spec/mspec/lib/mspec/commands/mspec.rb (revision 59106) @@ -109,7 +109,7 @@ class MSpecMain < MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/commands/mspec.rb#L109 } command = argv + ["-fy", "-o", name] $stderr.puts "$ #{command.join(' ')}" if $MSPEC_DEBUG - IO.popen([env, *command], "rb+") + IO.popen([env, *command, close_others: false], "rb+") } puts children.map { |child| child.gets }.uniq Index: spec/rubyspec/optional/capi/spec_helper.rb =================================================================== --- spec/rubyspec/optional/capi/spec_helper.rb (revision 59105) +++ spec/rubyspec/optional/capi/spec_helper.rb (revision 59106) @@ -57,10 +57,9 @@ def compile_extension(name) https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/optional/capi/spec_helper.rb#L57 make = ENV['MAKE'] make ||= (RbConfig::CONFIG['host_os'].include?("mswin") ? "nmake" : "make") - ENV.delete "MAKEFLAGS" # Fix make warning when invoked with -j in MRI # Do not capture stderr as we want to show compiler warnings - output = `#{make} V=1 DESTDIR=` + output = IO.popen([make, "V=1", "DESTDIR=", close_others: false], &:read) raise "#{make} failed:\n#{output}" unless $?.success? $stderr.puts output if debug -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/