summaryrefslogtreecommitdiff
path: root/spec/default.mspec
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-07 15:51:04 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-07 15:54:40 +0900
commitee86b57ee5df34390ba1d20343593adf8331c010 (patch)
tree9d29f65421a0a3ef987282d0b44f9a08faddb0dc /spec/default.mspec
parentb02b8e77562661865b380d78e7621edfd8149a8f (diff)
downloadruby-ee86b57ee5df34390ba1d20343593adf8331c010.tar.gz
Revert jobserver handling in spec
Diffstat (limited to 'spec/default.mspec')
-rw-r--r--spec/default.mspec14
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/default.mspec b/spec/default.mspec
index 33ac691b94..0dba98306c 100644
--- a/spec/default.mspec
+++ b/spec/default.mspec
@@ -29,19 +29,11 @@ end
module MSpecScript::JobServer
def cores(max = 1)
- if max > 1 and /(?:\A|\s)--jobserver-(?:auth|fds)=(?:(\d+),(\d+)|fifo:((?:\\.|\S)+))/ =~ ENV["MAKEFLAGS"]
+ if max > 1 and /(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ ENV["MAKEFLAGS"]
cores = 1
begin
- 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
- r.close_on_exec = true
- w.close_on_exec = true
+ r = IO.for_fd($1.to_i(10), "rb", autoclose: false)
+ w = IO.for_fd($2.to_i(10), "wb", autoclose: false)
jobtokens = r.read_nonblock(max - 1)
cores = jobtokens.size
if cores > 0