summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-08 16:19:06 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-08 16:19:35 -0800
commit58ebff02fd350f1b73d62caf0c1e976b4576e2ab (patch)
tree73ea6270202a684ad263af4c01a75afe0d0ed85d /Makefile
parent71e14bb77b1bceca3cf6e48d4b074e74c046ed04 (diff)
Improved fuzztest.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fe781d6..afe939e 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ JSMODULES=$(wildcard js/lib/*.js)
SPEC=spec.txt
SITE=_site
BUILDDIR=build
+FUZZCHARS=2000000 # for fuzztest
PROG?=$(BUILDDIR)/src/cmark
.PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check
@@ -71,8 +72,10 @@ operf: $(PROG)
operf $(PROG) <$(BENCHINP) >/dev/null
fuzztest:
- for i in `seq 1 10`; do \
- time cat /dev/urandom | head -c 500000 | iconv -f latin1 -t utf-8 | tee fuzz-$$i.txt | $(PROG) > /dev/null && rm fuzz-$$i.txt ; done
+ { for i in `seq 1 10`; do \
+ cat /dev/urandom | head -c $(FUZZCHARS) | iconv -f latin1 -t utf-8 | tee fuzz-$$i.txt | \
+ /usr/bin/env time -p $(PROG) >/dev/null && rm fuzz-$$i.txt ; \
+ done } 2>&1 | grep user
update-site: spec.html
make -C $(SITE) update