firmware/extra/nanopb/tests/regression/issue_342/SConscript
Patrick Moessler 0c83634f42 Initial commit
2019-10-13 00:37:11 +02:00

21 lines
694 B
Python

# Regression test for #342:
# Possible null-pointer dereference in pb_decode.c
Import("env")
# Define the compilation options
opts = env.Clone()
opts.Append(CPPDEFINES = {'PB_OLD_CALLBACK_STYLE': 1})
# Build new version of core
strict = opts.Clone()
strict.Append(CFLAGS = strict['CORECFLAGS'])
strict.Object("pb_decode_oldcallback.o", "$NANOPB/pb_decode.c")
strict.Object("pb_encode_oldcallback.o", "$NANOPB/pb_encode.c")
strict.Object("pb_common_oldcallback.o", "$NANOPB/pb_common.c")
opts.NanopbProto("extensions")
testprog = opts.Program(["test_extensions.c", "extensions.pb.c", "pb_encode_oldcallback.o", "pb_decode_oldcallback.o", "pb_common_oldcallback.o"])
opts.RunTest(testprog)