1# Test usage of Any type 2 3Import("env") 4 5incpath = env.Clone() 6incpath.Append(PROTOCPATH = '#any_type') 7incpath.Append(CPPPATH = '$BUILD/any_type') 8 9incpath.NanopbProto("anytest") 10incpath.NanopbProto(["google/protobuf/any", "google/protobuf/any.options"]) 11incpath.NanopbProto("google/protobuf/duration") 12 13enc = incpath.Program(["encode_any.c", "anytest.pb.c", "google/protobuf/any.pb.c", 14 "google/protobuf/duration.pb.c", 15 "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 16 17dec = incpath.Program(["decode_any.c", "anytest.pb.c", "google/protobuf/any.pb.c", 18 "google/protobuf/duration.pb.c", 19 "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) 20 21env.RunTest(enc) 22env.RunTest([dec, "encode_any.output"]) 23 24