diff options
| author | Waleed Khan | 2014-12-04 16:00:45 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-07 17:37:57 +0000 |
| commit | 26edffdda16c6d3454b730c594d2fd992603caab (patch) | |
| tree | 5c800af960e5fec5fe3a7404cde6c9bfca6e2449 /Library/Formula | |
| parent | 75d1c094326e0d86ce8d315a483b4fbe8000beb5 (diff) | |
| download | homebrew-26edffdda16c6d3454b730c594d2fd992603caab.tar.bz2 | |
afl-fuzz 0.85b (new formula)
Closes #34680.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/afl-fuzz.rb | 32 |
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 |
