1 # Run the alltypes test case, but compile with PB_FIELD_32BIT=1.
2 # Also the .proto file has been modified to have high indexes.
6 # Take copy of the files for custom build.
7 c = Copy("$TARGET", "$SOURCE")
8 env.Command("pb_encode.c", "#../pb_encode.c", c)
9 env.Command("pb_decode.c", "#../pb_decode.c", c)
10 env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c)
11 env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c)
13 env.NanopbProto(["alltypes", "alltypes.options"])
15 # Define the compilation options
17 opts.Append(CPPDEFINES = {'PB_FIELD_32BIT': 1})
19 # Now build and run the test normally.
20 enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode.c"])
21 dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode.c"])
24 env.RunTest([dec, "encode_alltypes.output"])