From ead4f4b77b23874d275863180cf4fd7ebebd38cd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 8 Nov 2014 16:19:06 -0800 Subject: Improved fuzztest. --- Makefile | 7 +++++-- 1 file 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 -- cgit v1.2.3