aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorWaleed Khan2014-12-04 16:00:45 -0500
committerMike McQuaid2014-12-07 17:37:57 +0000
commit26edffdda16c6d3454b730c594d2fd992603caab (patch)
tree5c800af960e5fec5fe3a7404cde6c9bfca6e2449 /Library
parent75d1c094326e0d86ce8d315a483b4fbe8000beb5 (diff)
downloadhomebrew-26edffdda16c6d3454b730c594d2fd992603caab.tar.bz2
afl-fuzz 0.85b (new formula)
Closes #34680.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/afl-fuzz.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/afl-fuzz.rb b/Library/Formula/afl-fuzz.rb
new file mode 100644
index 000000000..0ac7d0b23
--- /dev/null
+++ b/Library/Formula/afl-fuzz.rb
@@ -0,0 +1,32 @@
+require "formula"
+
+class AflFuzz < Formula
+ homepage "http://lcamtuf.coredump.cx/afl/"
+ url "http://lcamtuf.coredump.cx/afl/releases/afl-0.85b.tgz"
+ sha1 "036c6064b24c3211524d7713d9b0f0590d7255f7"
+
+ head "http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz"
+
+ def install
+ system "make", "PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
+ end
+
+ test do
+ cpp_file = testpath/"main.cpp"
+ exe_file = testpath/"a.out"
+
+ cpp_file.write(
+ <<-EOS.undent
+ #include <iostream>
+
+ int main() {
+ std::cout << "Hello, world!";
+ }
+ EOS
+ )
+
+ system "afl-clang++", cpp_file, "-o", exe_file
+ assert_equal `#{exe_file}`, "Hello, world!"
+ end
+end