aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-07-30 09:59:08 +0000
committerPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-07-30 09:59:08 +0000
commitf8364310d3ca85d2cf59019bb4bc5e9ff4c52dc3 (patch)
treee5ddbe4c28353630fb4881717058ed5f9cd83db7 /tests/Makefile
parentd7863b7424b1be5da33e9d632365f3e2c0538461 (diff)
unittests (some)
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index d357c674..ddf91ebb 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