Skip to content

Commit

Permalink
Merge pull request #199154 from Homebrew/sslsplit-pkgconf
Browse files Browse the repository at this point in the history
sslsplit: migrate to `pkgconf`
  • Loading branch information
BrewTestBot authored Nov 27, 2024
2 parents 8e54b60 + b1aade2 commit 6f99927
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Formula/s/sslsplit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Sslsplit < Formula
end

depends_on "check" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "libevent"
depends_on "libnet"
depends_on "libpcap"
Expand All @@ -43,10 +43,12 @@ def install
end

test do
port = free_port

cmd = "#{bin}/sslsplit -D http 0.0.0.0 #{port} www.roe.ch 80"
output = pipe_output("(#{cmd} & PID=$! && sleep 3 ; kill $PID) 2>&1")
assert_match "Starting main event loop", output
Open3.popen2e(bin/"sslsplit", "-D", "http", "0.0.0.0", free_port.to_s, "www.roe.ch", "80") do |_, stdout, w|
sleep 5
sleep 10 if OS.mac? && Hardware::CPU.intel?
assert_match "Starting main event loop", stdout.read_nonblock(4096)
ensure
Process.kill "TERM", w.pid
end
end
end

0 comments on commit 6f99927

Please sign in to comment.