1# Build and run a basic round-trip test using direct stream encoding. 2 3Import("env") 4 5enc = env.Program(["encode_stream.c", "$COMMON/person.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 6dec = env.Program(["decode_stream.c", "$COMMON/person.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) 7 8env.RunTest(enc) 9env.RunTest([dec, "encode_stream.output"]) 10env.Decode(["encode_stream.output", "$COMMON/person.proto"], MESSAGE = "Person") 11env.Compare(["decode_stream.output", "encode_stream.decoded"]) 12 13