summaryrefslogtreecommitdiffstats
path: root/tests/Makefile
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-13 18:44:15 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-01-13 18:44:15 +0200
commitb9baec6b4c3a04136ea0430109bc7bc1eda12685 (patch)
tree596e2c2c1cba87462aed032d23844886927ce417 /tests/Makefile
parentd2c1604d6d239cdab6b21f3daf6634eb112ae318 (diff)
Add a test for the backwards compatibility of generated files.
It is not necessary to maintain full compatibility of generated files for all of eternity, but this test will warn us if there is a need to regenerate the files.
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 58b84a3b..63830999 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -7,7 +7,8 @@ TESTS= decode_unittests encode_unittests \
test_encode1 test_encode2 test_encode3 \
test_decode_callbacks test_encode_callbacks \
test_missing_fields test_no_messages \
- test_multiple_files test_cxxcompile test_options
+ test_multiple_files test_cxxcompile test_options \
+ bc_encode bc_decode
# More strict checks for the core part of nanopb
CC_VERSION=$(shell $(CC) -v 2>&1)
@@ -57,6 +58,8 @@ test_missing_fields: test_missing_fields.o pb_encode.o pb_decode.o missing_field
decode_unittests: decode_unittests.o pb_decode.o unittestproto.pb.o
encode_unittests: encode_unittests.o pb_encode.o unittestproto.pb.o
test_no_messages: no_messages.pb.h no_messages.pb.c no_messages.pb.o
+bc_encode: bc_alltypes.pb.o pb_encode.o bc_encode.o
+bc_decode: bc_alltypes.pb.o pb_decode.o bc_decode.o
%.pb: %.proto
protoc -I. -I../generator -I/usr/include -o$@ $<
@@ -95,6 +98,7 @@ run_unittests: $(TESTS)
./test_encode3 | ./test_decode3
./test_encode3 1 | ./test_decode3 1
./test_encode3 1 | protoc --decode=AllTypes -I. -I../generator -I/usr/include alltypes.proto >/dev/null
+ ./bc_encode | ./bc_decode
./test_missing_fields