summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-05-04 09:48:52 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-05-04 09:48:52 -0700
commitd12c040d58d70555cc98e397e05ab0d8326b6aca (patch)
tree3c0052d750bd1e2a1f26f385374ce2e06949588a /Makefile
parent645bcf6a39a534ae2e8840e73196b24c9f24c145 (diff)
Improved 'make leakcheck'.
* We now return an error status if anything in the loop fails. * We now check --smart and --normalize options.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6f58b52..3606368 100644
--- a/Makefile
+++ b/Makefile
@@ -125,9 +125,14 @@ $(ALLTESTS): $(SPEC)
python3 test/spec_tests.py --spec $< --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@
leakcheck: $(ALLTESTS)
+ rc=0; \
for format in html man xml commonmark; do \
- cat $< | valgrind --leak-check=full --dsymutil=yes --error-exitcode=1 $(PROG) -t $$format >/dev/null; \
- done
+ for opts in "" "--smart" "--normalize"; do \
+ echo "cmark -t $$format $$opts" ; \
+ cat $< | valgrind -q --leak-check=full --dsymutil=yes --error-exitcode=1 $(PROG) -t $$format $$opts >/dev/null || rc=1; \
+ done; \
+ done; \
+ exit $$rc
fuzztest:
{ for i in `seq 1 10`; do \