]> thyrsus.com Git - intercal.git/commitdiff
Integrate fuzzer with build system ("make fuzz", "make test")
authorAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 22:56:57 +0000 (23:56 +0100)
committerAlex Smith <ais523@bham.ac.uk>
Thu, 2 Sep 2010 22:56:57 +0000 (23:56 +0100)
buildaux/Makefile.am
etc/interfuzz.pl

index a97286da7a4eeaf80ab082a128649554d221a481..d0f2cbee38d647ab9d17065f73dc0f019414d203 100644 (file)
@@ -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
index 30bf168b7e8e696b970fac4e285fade010e0f681..10be59768aa28a9a62ff7f6c0700fde3147fbd3e 100755 (executable)
@@ -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`;