SConscript 708 B

12345678910111213141516171819202122
  1. # Test the 'msgid' feature for identifying encoded messages
  2. Import('env')
  3. env.NanopbProto('msgid_example')
  4. enc = env.Program(['encode_msgid.c',
  5. 'msgid_example.pb.c',
  6. '$COMMON/pb_encode.o',
  7. '$COMMON/pb_common.o'])
  8. dec = env.Program(['decode_msgid.c',
  9. 'msgid_example.pb.c',
  10. '$COMMON/pb_decode.o',
  11. '$COMMON/pb_common.o'])
  12. env.RunTest("message1.pb", enc, ARGS = ['1'])
  13. env.RunTest("message1.txt", [dec, 'message1.pb'])
  14. env.RunTest("message2.pb", enc, ARGS = ['2'])
  15. env.RunTest("message2.txt", [dec, 'message2.pb'])
  16. env.RunTest("message3.pb", enc, ARGS = ['3'])
  17. env.RunTest("message3.txt", [dec, 'message3.pb'])