From 16a00dfd070b7f5342eb3fa80e3f549133ebcdfb Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Apr 13 2017 17:00:52 +0000 Subject: Add a simple %check section. --- diff --git a/american-fuzzy-lop.spec b/american-fuzzy-lop.spec index 1f40596..e5ee091 100644 --- a/american-fuzzy-lop.spec +++ b/american-fuzzy-lop.spec @@ -4,7 +4,7 @@ Name: american-fuzzy-lop Version: 2.41b -Release: 2%{?dist} +Release: 3%{?dist} Summary: Practical, instrumentation-driven fuzzer for binary formats @@ -14,6 +14,9 @@ URL: http://lcamtuf.coredump.cx/afl/ Source0: http://lcamtuf.coredump.cx/afl/releases/afl-%{version}.tgz +# For running the tests: +Source1: hello.c + # Upstream includes armv7hl support as some non-integrated 'contrib' # files, so I have not enabled it here. No other arch is supported # without arch-specific changes. @@ -108,6 +111,24 @@ popd MISC_PATH="%{_pkgdocdir}" \ +%check +# This just checks that simple programs can be compiled using +# the compiler wrappers. +ln -s %{SOURCE1} hello.cpp +./afl-gcc %{SOURCE1} -o hello +./hello +./afl-g++ hello.cpp -o hello +./hello +./afl-clang %{SOURCE1} -o hello +./hello +./afl-clang++ hello.cpp -o hello +./hello +./afl-clang-fast %{SOURCE1} -o hello +./hello +./afl-clang-fast++ hello.cpp -o hello +./hello + + %files %doc docs/* %doc dictionaries/ @@ -152,6 +173,7 @@ popd - New upstream version 2.41b (RHBZ#1441654). - Fix Source URL. - Compile afl-clang-fast (in a new subpackage). +- Add a simple check section. * Tue Apr 4 2017 Richard W.M. Jones - 2.40b-1 - New upstream version 2.40b (RHBZ#1418875). diff --git a/hello.c b/hello.c new file mode 100644 index 0000000..ff80b4f --- /dev/null +++ b/hello.c @@ -0,0 +1,9 @@ +#include +#include + +int +main () +{ + printf ("hello, world\n"); + return 0; +}