From f8364310d3ca85d2cf59019bb4bc5e9ff4c52dc3 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sat, 30 Jul 2011 09:59:08 +0000 Subject: unittests (some) git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9 --- tests/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index d357c67..ddf91eb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,13 +1,17 @@ -CFLAGS=-ansi -pedantic -Wall -I .. -g -O0 +CFLAGS=-ansi -Wall -Werror -I .. -g -O0 DEPS=../pb_decode.c ../pb_decode.h ../pb.h +TESTS=test_decode1 decode_unittests -all: test_decode1 +all: $(TESTS) clean: rm -f test_decode1 -test_decode1: test_decode1.c $(DEPS) +%: %.c $(DEPS) $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c -fuzztest: test_decode1 +run_unittests: decode_unittests + ./decode_unittests + +run_fuzztest: test_decode1 bash -c 'I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$$(($$I+1)); echo -en "\r$$I"; done' \ No newline at end of file -- cgit 1.2.3-korg