Skip to content

Commit 7d973da

Browse files
BrewTestBotp-linnane
authored andcommitted
yaf 2.19.1
yaf: update test to work around yafscii 2.19.1 segfault yaf: add pcre2 dependency for macOS Signed-off-by: Patrick Linnane <patrick@linnane.io>
1 parent 0665eeb commit 7d973da

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Formula/y/yaf.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class Yaf < Formula
22
desc "Yet another flowmeter: processes packet data from pcap(3)"
33
homepage "https://tools.netsa.cert.org/yaf/"
4-
url "https://tools.netsa.cert.org/releases/yaf-2.18.3.tar.gz"
5-
sha256 "4cee46b11371fc5b7b76044c7efadb1e30043e699eb0d8d1aa4f1ca6436e8cdd"
4+
url "https://tools.netsa.cert.org/releases/yaf-2.19.1.tar.gz"
5+
sha256 "d2bab3eab2a227eaeedc8624c69dfb77a7ba314d02c3f050cbb829e7ccf66271"
66
license "GPL-2.0-only"
77

88
# NOTE: This should be updated to check the main `/yaf/download.html`
@@ -31,6 +31,7 @@ class Yaf < Formula
3131

3232
on_macos do
3333
depends_on "gettext"
34+
depends_on "pcre2"
3435
end
3536

3637
on_linux do
@@ -46,11 +47,12 @@ def install
4647
end
4748

4849
test do
49-
input = test_fixtures("test.pcap")
50-
output = pipe_output("#{bin}/yafscii", shell_output("#{bin}/yaf --in #{input}"), 0)
50+
# FIXME: yafscii 2.19.1 segfaults when reading stdin or writing stdout
51+
system bin/"yaf", "--in", test_fixtures("test.pcap"), "--out", testpath/"flow.ipfix"
52+
system bin/"yafscii", "--in", testpath/"flow.ipfix", "--out", testpath/"flow.txt"
5153
expected = "2014-10-02 10:29:06.168497 - 10:29:06.169875 (0.001378 sec) tcp " \
5254
"192.168.1.115:51613 => 192.168.1.118:80 71487608:98fc8ced " \
5355
"S/APF:AS/APF (7/453 <-> 5/578) rtt 451 us"
54-
assert_equal expected, output.strip
56+
assert_equal expected, (testpath/"flow.txt").read.strip
5557
end
5658
end

0 commit comments

Comments
 (0)