ruby-changes:47359
From: nobu <ko1@a...>
Date: Thu, 3 Aug 2017 09:53:32 +0900 (JST)
Subject: [ruby-changes:47359] nobu:r59475 (trunk): spec_helper.rb: pass jobserver fds
nobu 2017-08-03 09:53:25 +0900 (Thu, 03 Aug 2017) New Revision: 59475 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59475 Log: spec_helper.rb: pass jobserver fds * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): pass jobserver fds explicitly, because other specs might have set close_on_exec flags on these fds. Modified files: trunk/spec/rubyspec/optional/capi/spec_helper.rb Index: spec/rubyspec/optional/capi/spec_helper.rb =================================================================== --- spec/rubyspec/optional/capi/spec_helper.rb (revision 59474) +++ spec/rubyspec/optional/capi/spec_helper.rb (revision 59475) @@ -62,8 +62,15 @@ def compile_extension(name) https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/optional/capi/spec_helper.rb#L62 ENV["MAKEFLAGS"] = "l#{ENV["MAKEFLAGS"]}" end + opts = {} + if /(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ ENV["MAKEFLAGS"] + r = IO.for_fd($1.to_i(10), "rb", autoclose: false) + w = IO.for_fd($2.to_i(10), "wb", autoclose: false) + opts[r] = r + opts[w] = w + end # Do not capture stderr as we want to show compiler warnings - output = IO.popen([make, "V=1", "DESTDIR=", close_others: false], &:read) + output = IO.popen([make, "V=1", "DESTDIR=", opts], &:read) raise "#{make} failed:\n#{output}" unless $?.success? $stderr.puts output if debug -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/