Skip to content

Commit cf3c314

Browse files
committed
vineyard: try to debug macos test failure
Follow-up to #230431
1 parent 7a6ad7b commit cf3c314

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Formula/v/vineyard.rb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,30 @@ def install
142142
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
143143
system "cmake", "--build", "build"
144144

145+
vineyard_sock = Pathname.new("/tmp/vineyard.sock")
145146
# prepare vineyardd
146147
vineyardd_pid = spawn bin/"vineyardd", "--norpc",
147148
"--meta=local",
148-
"--socket=#{testpath}/vineyard.sock"
149+
"--socket=#{vineyard_sock}"
149150

150151
# sleep to let vineyardd get its wits about it
151152
sleep 10
152-
sleep 10 if OS.mac? && Hardware::CPU.intel?
153+
154+
if OS.mac? && Hardware::CPU.intel?
155+
ohai "vineyard_sock.exist? #{vineyard_sock.exist?}"
156+
ohai "vineyard_sock.socket? #{vineyard_sock.socket?}"
157+
end
153158

154159
assert_equal("vineyard instance is: 0\n",
155-
shell_output("#{testpath}/build/vineyard-test #{testpath}/vineyard.sock"))
160+
shell_output("#{testpath}/build/vineyard-test #{vineyard_sock}"))
156161
ensure
162+
if OS.mac? && Hardware::CPU.intel?
163+
ohai "in `ensure`"
164+
ohai "vineyard_sock.exist? #{vineyard_sock.exist?}"
165+
ohai "vineyard_sock.socket? #{vineyard_sock.socket?}"
166+
end
157167
# clean up the vineyardd process before we leave
158168
Process.kill("HUP", vineyardd_pid)
169+
rm vineyard_sock, force: true
159170
end
160171
end

0 commit comments

Comments
 (0)