ruby-changes:54183
From: normal <ko1@a...>
Date: Sat, 15 Dec 2018 13:40:19 +0900 (JST)
Subject: [ruby-changes:54183] normal:r66404 (trunk): test/lib/test/unit.rb: do not propagate MAKEFLAGS to children
normal 2018-12-15 13:40:14 +0900 (Sat, 15 Dec 2018) New Revision: 66404 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66404 Log: test/lib/test/unit.rb: do not propagate MAKEFLAGS to children Propagating MAKEFLAGS to children running test/unit caused stuck tests with GNU make when "-jN" is passed in both the make(1) command-line and the "TESTS=" variable; because the forked child process would see MAKEFLAGS and try to use jobserver on its own. This is regression caused by r64399 (commit b53fadfd5f200dbd6fe9f4b2a91ebb68618e59bb, "process.c: defaults to close_others false"); but that change also fixed a regression when close-on-exec became the default in 2.0 :< Modified files: trunk/test/lib/test/unit.rb Index: test/lib/test/unit.rb =================================================================== --- test/lib/test/unit.rb (revision 66403) +++ test/lib/test/unit.rb (revision 66404) @@ -136,8 +136,9 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L136 def non_options(files, options) @jobserver = nil + makeflags = ENV.delete("MAKEFLAGS") if !options[:parallel] and - /(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ ENV["MAKEFLAGS"] + /(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ makeflags begin r = IO.for_fd($1.to_i(10), "rb", autoclose: false) w = IO.for_fd($2.to_i(10), "wb", autoclose: false) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/