summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-25 11:04:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-25 11:04:08 -0800
commit440a56ba2b12e1c5d068ab6d8a5768d7470d5a31 (patch)
treea03d9a11ea28ae999b93050bca9d7581c18aeb6d /Makefile
parentbfd2170d58f8dde8d5cc86bffe2b9f3bda3c5186 (diff)
Removed leakcheck.md; regenerate alltests.md with Makefile target.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2dc9e5b..26ca5ff 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ ZIPARCHIVE?=cmark-$(SPECVERSION).zip
FUZZCHARS?=2000000 # for fuzztest
BENCHDIR=bench
BENCHFILE=$(BENCHDIR)/benchinput.md
+ALLTESTS=alltests.md
NUMRUNS?=10
PROG?=$(BUILDDIR)/src/cmark
BENCHINP?=README.md
@@ -106,8 +107,11 @@ testziparchive: $(ZIPARCHIVE)
cd $(PKGDIR); \
mkdir build && cd build && cmake .. && make && ctest -V
-leakcheck: $(PROG)
- cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes --error-exitcode=1 $(PROG) >/dev/null
+$(ALLTESTS): spec.txt
+ python runtests.py --spec $< --dump-tests | python -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print "\n".join([test["markdown"] for test in tests]).encode("utf-8")' > $@
+
+leakcheck: $(ALLTESTS) $(PROG)
+ cat $< | valgrind --leak-check=full --dsymutil=yes --error-exitcode=1 $(PROG) >/dev/null
fuzztest:
{ for i in `seq 1 10`; do \
@@ -141,7 +145,7 @@ distclean: clean
-rm -rf *.dSYM
-rm -f README.html
-rm -f spec.md fuzz.txt spec.html
- -rm -rf $(BENCHFILE) progit
+ -rm -rf $(BENCHFILE) $(ALLTESTS) progit
### JavaScript ###