1 # Run the alltypes test case, but compile with PB_FIELD_16BIT=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("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c)
9 env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c)
11 env.NanopbProto(["alltypes", "alltypes.options"])
13 # Define the compilation options
15 opts.Append(CPPDEFINES = {'PB_FIELD_16BIT': 1})
17 # Build new version of core
19 strict.Append(CFLAGS = strict['CORECFLAGS'])
20 strict.Object("pb_decode_fields16.o", "$NANOPB/pb_decode.c")
21 strict.Object("pb_encode_fields16.o", "$NANOPB/pb_encode.c")
23 # Now build and run the test normally.
24 enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_fields16.o"])
25 dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_fields16.o"])
28 env.RunTest([dec, "encode_alltypes.output"])