diff options
| author | Christian Grothoff <christian@grothoff.org> | 2023-07-21 14:39:18 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2023-07-21 14:39:18 +0200 | 
| commit | e21995f0009b4143e19f3a618bf8107c9bc94a50 (patch) | |
| tree | 79b5a21becb06fa7774d69b4ae5c5612ee4a2952 /src/templating/test6 | |
| parent | b853c7449c3817b997c6a3db77d2fb053bc9d1d1 (diff) | |
-add Makefiles
Diffstat (limited to 'src/templating/test6')
| -rw-r--r-- | src/templating/test6/Makefile | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/src/templating/test6/Makefile b/src/templating/test6/Makefile new file mode 100644 index 00000000..5fcf5c59 --- /dev/null +++ b/src/templating/test6/Makefile @@ -0,0 +1,17 @@ +.PHONY: test clean + +test-custom-write: test-custom-write.c ../mustach-json-c.h ../mustach-json-c.c ../mustach-wrap.c ../mustach.h ../mustach.c +	@echo building test-custom-write +	$(CC) $(CFLAGS) $(LDFLAGS) -g -o test-custom-write test-custom-write.c  ../mustach.c  ../mustach-json-c.c ../mustach-wrap.c -ljson-c + +test: test-custom-write +	@echo starting test +	@valgrind ./test-custom-write json -U must -l must -x must > resu.last 2> vg.last +	@sed -i 's:^==[0-9]*== ::' vg.last +	@diff -w resu.ref resu.last && echo "result ok" || echo "ERROR! Result differs" +	@awk '/^ *total heap usage: .* allocs, .* frees,.*/{if($$4-$$6)exit(1)}' vg.last || echo "ERROR! Alloc/Free issue" +	@echo + +clean: +	rm -f resu.last vg.last test-custom-write + | 
