From 2c9e719e3784d79e9fafaba0013466f72ef515a0 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 6 Nov 2026 18:03:02 -0800 Subject: [PATCH] fix(gst): backport the sandbox-safe Homebrew formula test to release Backports the moq-gst.rb.tmpl test from #5841: gst-inspect-1.0 hangs inside Homebrew's test sandbox on a headless Mac, failing every moq-gst tag since 0.4.20. Co-Authored-By: Claude Opus 5.5 --- .github/homebrew/Formula/moq-gst.rb.tmpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/homebrew/Formula/moq-gst.rb.tmpl b/.github/homebrew/Formula/moq-gst.rb.tmpl index 59987c954b8..d12c610532e 100644 --- a/.github/homebrew/Formula/moq-gst.rb.tmpl +++ b/.github/homebrew/Formula/moq-gst.rb.tmpl @@ -42,13 +42,13 @@ class MoqGst < Formula EOS end + # gst-inspect-1.0 hangs at startup inside the test sandbox on a headless Mac, even for + # --version, so check the plugin links GStreamer rather than loading it. The release + # build loads it into GStreamer outside the sandbox. test do - plugin = OS.mac? ? "libgstmoq.dylib" : "libgstmoq.so" - assert_predicate lib/"gstreamer-1.0"/plugin, :exist? - ENV["GST_REGISTRY"] = (testpath/"registry.bin").to_s - ENV["GST_PLUGIN_PATH_1_0"] = (lib/"gstreamer-1.0").to_s - ENV["GST_PLUGIN_SYSTEM_PATH_1_0"] = "" - output = shell_output("#{Formula["gstreamer"].opt_bin}/gst-inspect-1.0 moq") - assert_match (lib/"gstreamer-1.0"/plugin).to_s, output + plugin = lib/"gstreamer-1.0"/(OS.mac? ? "libgstmoq.dylib" : "libgstmoq.so") + assert_predicate plugin, :exist? + linked = plugin.dynamically_linked_libraries.map { |library| File.basename(library) } + assert linked.any? { |library| library.start_with?("libgstreamer-1.0.") }, linked.join(", ") end end