SConscript 631 B

123456789101112131415161718192021
  1. # Check that callback fields inside malloc()ed messages
  2. # are correctly initialized.
  3. Import('env', 'malloc_env')
  4. env.NanopbProto('callback_pointer')
  5. p = malloc_env.Program(["callback_pointer.c",
  6. "callback_pointer.pb.c",
  7. "$COMMON/pb_decode_with_malloc.o",
  8. "$COMMON/pb_common_with_malloc.o",
  9. "$COMMON/malloc_wrappers.o"])
  10. # Run test under valgrind if available
  11. kwargs = {}
  12. if env.get("VALGRIND"):
  13. kwargs['COMMAND'] = env['VALGRIND']
  14. kwargs['ARGS'] = ["-q", "--error-exitcode=99", p[0].abspath]
  15. env.RunTest(p, **kwargs)