From 088a466874d910f15451cf59b08286be1d5f8683 Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 2 Sep 2010 23:56:57 +0100 Subject: [PATCH] Integrate fuzzer with build system ("make fuzz", "make test") --- buildaux/Makefile.am | 7 +++++++ etc/interfuzz.pl | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/buildaux/Makefile.am b/buildaux/Makefile.am index a97286d..d0f2cbe 100644 --- a/buildaux/Makefile.am +++ b/buildaux/Makefile.am @@ -192,6 +192,13 @@ check-am: ick$(EXEEXT) chmod u+w $(top_srcdir)/pit/tests make -f $(top_srcdir)/pit/Makefile ICK="./ick$(EXEEXT) -b" PIT=$(top_srcdir)/pit test +# Run the fuzztest +fuzz: ick$(EXEEXT) src/idiotism.oil $(top_srcdir)/etc/interfuzz.pl + ICK="./ick$(EXEEXT)" IDIOTISM="$(top_srcdir)/src/idiotism.oil" perl $(top_srcdir)/etc/interfuzz.pl + +# Run regression tests, fuzz tests and build tests +test: fuzz distcheck + # If a documentation file is needed but not available, invoke the doc # makefile to build it. doc/ick.txt: doc/ick.txi diff --git a/etc/interfuzz.pl b/etc/interfuzz.pl index 30bf168..10be597 100755 --- a/etc/interfuzz.pl +++ b/etc/interfuzz.pl @@ -291,8 +291,9 @@ system $compilecommand; print STDERR "Running optimised program...\n"; my $optimised_output = `$fn`; +# -g suppresses optimisation print STDERR "Compiling program unoptimised...\n"; -system "$ickpath -b $fn.i"; +system "$ickpath -bg $fn.i"; print STDERR "Running unoptimised program...\n"; my $unoptimised_output = `$fn`; -- 2.43.0