Unittests for encode
[apps/agl-service-can-low-level.git] / tests / Makefile
1 CFLAGS=-ansi -Wall -Werror -I .. -g -O0
2 DEPS=../pb_decode.c ../pb_decode.h ../pb_encode.c ../pb_encode.h ../pb.h person.h unittests.h
3 TESTS=test_decode1 test_encode1 decode_unittests encode_unittests
4
5 all: $(TESTS) run_unittests
6
7 clean:
8         rm -f $(TESTS)
9
10 %: %.c $(DEPS)
11         $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c ../pb_encode.c
12
13 run_unittests: decode_unittests encode_unittests
14         ./decode_unittests
15         ./encode_unittests
16
17 run_fuzztest: test_decode1
18         bash -c 'I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$$(($$I+1)); echo -en "\r$$I"; done'