You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
648 B
23 lines
648 B
# Check that callback fields inside malloc()ed messages
|
|
# are correctly initialized.
|
|
|
|
Import('env', 'malloc_env')
|
|
|
|
env.NanopbProto('callback_pointer')
|
|
|
|
p = malloc_env.Program(["callback_pointer.c",
|
|
"callback_pointer.pb.c",
|
|
"$COMMON/pb_decode_with_malloc.o",
|
|
"$COMMON/pb_common_with_malloc.o",
|
|
"$COMMON/malloc_wrappers.o"])
|
|
|
|
# Run test under valgrind if available
|
|
valgrind = env.WhereIs('valgrind')
|
|
kwargs = {}
|
|
if valgrind:
|
|
kwargs['COMMAND'] = valgrind
|
|
kwargs['ARGS'] = ["-q", "--error-exitcode=99", p[0].abspath]
|
|
|
|
env.RunTest(p, **kwargs)
|
|
|