diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-11-07 10:08:30 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-11-07 10:08:30 +0900 |
commit | b02b8e77562661865b380d78e7621edfd8149a8f (patch) | |
tree | bd5d50feb51644332e1fdac231e1b0172ed0a7c3 /bootstraptest/runner.rb | |
parent | ab01b8f23f1e218fa5a360806120a1d6eaaa228f (diff) |
Let other test runners follow the change of GNU make 4.4 jobserver
Diffstat (limited to 'bootstraptest/runner.rb')
-rwxr-xr-x | bootstraptest/runner.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 1d219be71e..f9b3e919b8 100755 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -108,10 +108,16 @@ BT = Class.new(bt) do def wn=(wn) unless wn == 1 - if /(?:\A|\s)--jobserver-(?:auth|fds)=\K(\d+),(\d+)/ =~ ENV.delete("MAKEFLAGS") + if /(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:((?:\\.|\S)+))/ =~ ENV.delete("MAKEFLAGS") begin - r = IO.for_fd($1.to_i(10), "rb", autoclose: false) - w = IO.for_fd($2.to_i(10), "wb", autoclose: false) + if fifo = $3 + fifo.gsub!(/\\(?=.)/, '') + r = File.open(fifo, IO::RDONLY|IO::NONBLOCK|IO::BINARY) + w = File.open(fifo, IO::WRONLY|IO::NONBLOCK|IO::BINARY) + else + r = IO.for_fd($1.to_i(10), "rb", autoclose: false) + w = IO.for_fd($2.to_i(10), "wb", autoclose: false) + end rescue => e r.close if r else |