Home
last modified time | relevance | path

Searched full:env (Results 1 – 25 of 123) sorted by relevance

12345

/nanopb-2.7.6/tests/
DSConstruct26 env = Environment(ENV = os.environ)
32 env.Append(**{var: val})
34 env.Replace(**{var: val})
36 env.SetDefault(BUILDDIR = "build")
37 env.SConsignFile(env['BUILDDIR'] + "/sconsign")
38 env.Replace(CONFIGUREDIR = env['BUILDDIR'] + "/config")
48 platform_func(env)
51 env.Tool("nanopb")
64 env.Replace(CC = "clang", CXX = "clang++")
67 add_nanopb_builders(env)
[all …]
/nanopb-2.7.6/tests/site_scons/site_tools/
Dnanopb.py10 myproto = env.NanopbProto("myproto")
13 env.Append(CPPPATH = "$NANOB")
14 myprog = env.Program(["myprog.c", myproto, "$NANOPB/pb_encode.c", "$NANOPB/pb_decode.c"])
22 env.SetDefault(NANOPB = "path/to/nanopb")
27 env.SetDefault(PROTOC = "path/to/protoc")
28 env.SetDefault(PROTOCFLAGS = "--plugin=protoc-gen-nanopb=path/to/protoc-gen-nanopb")
47 def _detect_nanopb(env): argument
49 if env.has_key('NANOPB'):
51 return env['NANOPB']
61 def _detect_python(env): argument
[all …]
/nanopb-2.7.6/tests/cxx_main_program/
DSConscript4 Import("env")
7 env = env.Clone()
8 env.Append(CPPDEFINES = ['__STDC_LIMIT_MACROS'])
12 env.Command("pb_encode.cxx", "#../pb_encode.c", c)
13 env.Command("pb_decode.cxx", "#../pb_decode.c", c)
14 env.Command("pb_common.cxx", "#../pb_common.c", c)
15 env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c)
16 env.Command("alltypes.pb.cxx", "$BUILD/alltypes/alltypes.pb.c", c)
17 env.Command("encode_alltypes.cxx", "$BUILD/alltypes/encode_alltypes.c", c)
18 env.Command("decode_alltypes.cxx", "$BUILD/alltypes/decode_alltypes.c", c)
[all …]
/nanopb-2.7.6/tests/regression/issue_569/
DSConscript4 Import("env")
7 env.NanopbProto("a")
8 env.NanopbProto("b")
9 env.Object("a.pb.c")
10 env.Object("b.pb.c")
13 env.NanopbProtoCpp("a")
14 env.NanopbProtoCpp("b")
15 env.Object("a_cpp.o", "a.pb.cpp")
16 env.Object("b_cpp.o", "b.pb.cpp")
/nanopb-2.7.6/tests/alltypes/
DSConscript4 Import("env")
6 env.NanopbProto(["alltypes", "alltypes.options"])
7 enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.…
8 dec = env.Program(["decode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.…
11 env.RunTest(enc)
12 env.RunTest([dec, "encode_alltypes.output"])
16 env.Decode("encode_alltypes.output.decoded",
19 env.Encode("encode_alltypes.output.recoded",
22 env.Compare(["encode_alltypes.output", "encode_alltypes.output.recoded"])
25 env.RunTest("optionals.output", enc, ARGS = ['1'])
[all …]
/nanopb-2.7.6/tests/regression/issue_118/
DSConscript3 Import("env")
4 env = env.Clone()
5 env.Append(PROTOCPATH = "#regression/issue_118")
7 env.NanopbProto("enumdef")
8 env.Object('enumdef.pb.c')
10 env.NanopbProto(["enumuse", "enumdef.proto"])
11 env.Object('enumuse.pb.c')
/nanopb-2.7.6/tests/options/
DSConscript3 Import("env")
5 env.NanopbProto("options")
6 env.Object('options.pb.c')
7 env.Match('options_h.matched', ['options.pb.h', 'options_h.expected'])
8 env.Match('options_c.matched', ['options.pb.c', 'options_c.expected'])
10 env.NanopbProto("proto3_options")
11 env.Object('proto3_options.pb.c')
12 env.Match(['proto3_options.pb.h', 'proto3_options.expected'])
14 p = env.Program(["options.c", "options.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMO…
15 env.RunTest(p)
/nanopb-2.7.6/tests/typename_mangling/
DSConscript3 Import('env')
6 def command(target, source, env):
12 env.Command("strip_package.options", "with_package.options", set_mangling("M_STRIP_PACKAGE"))
13 env.Command("strip_package.proto", "with_package.proto", Copy("$TARGET", "$SOURCE"))
14 env.NanopbProto(["strip_package", "strip_package.options"])
15 env.Program(["test_strip_package.c", "strip_package.pb.c", '$COMMON/pb_common.o'])
17 env.Command("flatten.options", "with_package.options", set_mangling("M_FLATTEN"))
18 env.Command("flatten.proto", "with_package.proto", Copy("$TARGET", "$SOURCE"))
19 env.NanopbProto(["flatten", "flatten.options"])
20 env.Program(["test_flatten.c", "flatten.pb.c", '$COMMON/pb_common.o'])
[all …]
/nanopb-2.7.6/tests/site_scons/platforms/avr/
Davr.py3 def set_avr_platform(env): argument
4 native = env.Clone()
8 env.Replace(EMBEDDED = "AVR")
9 env.Replace(CC = "avr-gcc",
11 env.Replace(TEST_RUNNER = "build/run_test")
12 env.Append(CFLAGS = "-mmcu=atmega1284 -Dmain=app_main -Os -g -Wall ")
13 env.Append(CXXFLAGS = "-mmcu=atmega1284 -Dmain=app_main -Os -Wno-type-limits")
14 env.Append(CPPDEFINES = {'PB_CONVERT_DOUBLE_FLOAT': 1, 'UNITTESTS_SHORT_MSGS': 1,
17 env.Append(LINKFLAGS = "-mmcu=atmega1284")
18 env.Append(LINKFLAGS = "-Wl,-Map,build/avr.map")
[all …]
/nanopb-2.7.6/tests/site_scons/platforms/stm32/
Dstm32.py6 def set_stm32_platform(env): argument
7 env.Replace(EMBEDDED = "STM32")
8 env.Replace(CC = "arm-none-eabi-gcc",
10 env.Replace(TEST_RUNNER = "site_scons/platforms/stm32/run_test.sh")
11 env.Append(CPPDEFINES = {'FUZZTEST_BUFSIZE': 4096})
12 env.Append(CFLAGS = "-mcpu=cortex-m3 -mthumb -Os")
13 env.Append(CXXFLAGS = "-mcpu=cortex-m3 -mthumb -Os")
14 env.Append(LINKFLAGS = "-mcpu=cortex-m3 -mthumb")
15 env.Append(LINKFLAGS = "site_scons/platforms/stm32/vectors.c")
16 env.Append(LINKFLAGS = "--specs=rdimon.specs")
[all …]
/nanopb-2.7.6/tests/alltypes_proto3/
DSConscript3 Import("env")
5 env.NanopbProto(["alltypes", "alltypes.options"])
6 enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.…
7 dec = env.Program(["decode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.…
10 env.RunTest(enc)
11 env.RunTest([dec, "encode_alltypes.output"])
15 env.Decode("encode_alltypes.output.decoded",
18 env.Encode("encode_alltypes.output.recoded",
21 env.Compare(["encode_alltypes.output", "encode_alltypes.output.recoded"])
24 env.RunTest("optionals.output", enc, ARGS = ['1'])
[all …]
/nanopb-2.7.6/tests/msgid/
DSConscript3 Import('env')
5 env.NanopbProto('msgid_example')
7 enc = env.Program(['encode_msgid.c',
12 dec = env.Program(['decode_msgid.c',
17 env.RunTest("message1.pb", enc, ARGS = ['1'])
18 env.RunTest("message1.txt", [dec, 'message1.pb'])
19 env.RunTest("message2.pb", enc, ARGS = ['2'])
20 env.RunTest("message2.txt", [dec, 'message2.pb'])
21 env.RunTest("message3.pb", enc, ARGS = ['3'])
22 env.RunTest("message3.txt", [dec, 'message3.pb'])
/nanopb-2.7.6/tests/regression/issue_203/
DSConscript3 Import('env')
4 env = env.Clone()
5 env.Replace(NANOPBFLAGS = "--strip-path")
6 env.Command(['file1.pb.c', 'file1.pb.h', 'file2.pb.c', 'file2.pb.h'], ['file1.proto', 'file2.proto'…
7 env['NANOPB_PROTO_CMD'])
9 env.Object('file1.pb.c')
10 env.Object('file2.pb.c')
/nanopb-2.7.6/tests/oneof/
DSConscript3 Import('env')
5 env.NanopbProto('oneof')
7 enc = env.Program(['encode_oneof.c',
12 dec = env.Program(['decode_oneof.c',
17 env.RunTest("message1.pb", enc, ARGS = ['1'])
18 env.RunTest("message1.txt", [dec, 'message1.pb'], ARGS = ['1'])
19 env.RunTest("message2.pb", enc, ARGS = ['2'])
20 env.RunTest("message2.txt", [dec, 'message2.pb'], ARGS = ['2'])
21 env.RunTest("message3.pb", enc, ARGS = ['3'])
22 env.RunTest("message3.txt", [dec, 'message3.pb'], ARGS = ['3'])
/nanopb-2.7.6/tests/fuzztest/
DSConscript9 Import("env", "malloc_env")
20 env.Command("alltypes_static.proto", "#alltypes/alltypes.proto",
21 lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_static'))
22 env.Command("alltypes_pointer.proto", "#alltypes/alltypes.proto",
23 lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_pointer'))
25 env.NanopbProto(["alltypes_pointer", "alltypes_pointer.options"])
26 env.NanopbProto(["alltypes_static", "alltypes_static.options"])
29 env.Command("alltypes_proto3_static.proto", "#alltypes_proto3/alltypes.proto",
30 lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_proto3_static'))
31 env.Command("alltypes_proto3_pointer.proto", "#alltypes_proto3/alltypes.proto",
[all …]
/nanopb-2.7.6/tests/alltypes_proto3_callback/
DSConscript3 Import("env", "malloc_env")
6 env.Command("alltypes.proto", "#alltypes_proto3/alltypes.proto", c)
8 env.NanopbProto(["alltypes", "alltypes.options"])
9 enc = env.Program(["encode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/p…
10 dec = env.Program(["decode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/p…
15 env.RunTest(enc)
16 env.RunTest("decode_alltypes.output", [refdec, "encode_alltypes_callback.output"])
17 env.RunTest("decode_alltypes_callback.output", [dec, "encode_alltypes_callback.output"])
20 env.RunTest("optionals.output", enc, ARGS = ['1'])
21 env.RunTest("optionals.refdecout", [refdec, "optionals.output"], ARGS = ['1'])
[all …]
/nanopb-2.7.6/tests/extra_fields/
DSConscript3 Import("env")
5 dec = env.GetBuildPath('$BUILD/basic_buffer/${PROGPREFIX}decode_buffer${PROGSUFFIX}')
6 env.RunTest('person_with_extra_field.output', [dec, "person_with_extra_field.pb"])
7 env.Compare(["person_with_extra_field.output", "person_with_extra_field.expected"])
9 dec = env.GetBuildPath('$BUILD/basic_stream/${PROGPREFIX}decode_stream${PROGSUFFIX}')
10 env.RunTest('person_with_extra_field_stream.output', [dec, "person_with_extra_field.pb"])
11 env.Compare(["person_with_extra_field_stream.output", "person_with_extra_field.expected"])
15 dec2 = env.GetBuildPath('$BUILD/backwards_compatibility/${PROGPREFIX}decode_legacy${PROGSUFFIX}')
16 env.RunTest('alltypes_with_extra_fields.output', [dec2, 'alltypes_with_extra_fields.pb'])
/nanopb-2.7.6/tests/callbacks/
DSConscript3 Import("env")
5 env.NanopbProto("callbacks")
6 enc = env.Program(["encode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_commo…
7 dec = env.Program(["decode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_commo…
9 env.RunTest(enc)
10 env.RunTest([dec, "encode_callbacks.output"])
12 env.Decode(["encode_callbacks.output", "callbacks.proto"], MESSAGE = "TestMessage")
13 env.Compare(["decode_callbacks.output", "encode_callbacks.decoded"])
/nanopb-2.7.6/tests/regression/issue_494/
DSConscript4 Import('env')
10 env.Command("oneof.pb", "oneof.proto", "$PROTOC $PROTOCFLAGS -I$BUILDDIR/regression/issue_494 -o$TA…
11 env.Command(["oneof.pb.c", "oneof.pb.h"], "oneof.pb", env['NANOPB_GENERATOR'] + " -D$BUILDDIR/regre…
12 env.NanopbProto("submessage.proto")
13 env.Depends("oneof.pb", "submessage.proto")
15 test = env.Program(["oneof_size.cc"])
16 env.Depends(test, "oneof.pb.h")
17 env.RunTest(test)
/nanopb-2.7.6/tests/alltypes_callback/
DSConscript3 Import("env", "malloc_env")
6 env.Command("alltypes.proto", "#alltypes/alltypes.proto", c)
8 env.NanopbProto(["alltypes", "alltypes.options"])
9 enc = env.Program(["encode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/p…
10 dec = env.Program(["decode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/p…
15 env.RunTest(enc)
16 env.RunTest("decode_alltypes.output", [refdec, "encode_alltypes_callback.output"])
17 env.RunTest("decode_alltypes_callback.output", [dec, "encode_alltypes_callback.output"])
20 env.RunTest("optionals.output", enc, ARGS = ['1'])
21 env.RunTest("optionals.refdecout", [refdec, "optionals.output"], ARGS = ['1'])
[all …]
/nanopb-2.7.6/tests/regression/issue_485/
DSConscript3 Import("env")
4 env.Match('pb_decode_c.matched', ["$NANOPB/pb_decode.c", 'uint8.expected'])
5 env.Match('pb_decode_h.matched', ["$NANOPB/pb_decode.h", 'uint8.expected'])
6 env.Match('pb_encode_c.matched', ["$NANOPB/pb_encode.c", 'uint8.expected'])
7 env.Match('pb_encode_h.matched', ["$NANOPB/pb_encode.h", 'uint8.expected'])
8 env.Match('pb_common_c.matched', ["$NANOPB/pb_common.c", 'uint8.expected'])
9 env.Match('pb_common_h.matched', ["$NANOPB/pb_common.h", 'uint8.expected'])
10 env.Match('pb_h.matched', ["$NANOPB/pb.h", 'uint8.expected'])
/nanopb-2.7.6/tests/regression/issue_524/
DSConscript4 Import('env')
6 env.NanopbProto("submessage.proto")
7 env.NanopbProto("oneof.proto")
8 env.Depends("oneof.pb.c", "submessage.proto")
9 env.Object("oneof.pb.c")
10 env.Match(["oneof.pb.h", "oneof.expected"])
/nanopb-2.7.6/tests/oneof_callback/
DSConscript3 Import('env')
5 env.NanopbProto('oneof')
7 enc = env.Program(['encode_oneof.c',
12 dec = env.Program(['decode_oneof.c',
19 e = env.RunTest("message%d.pb" % i, enc, ARGS = [str(i)])
20 d1 = env.Decode([e, "oneof.proto"], MESSAGE = "OneOfMessage")
21 d2 = env.RunTest("message%d.txt" % i, [dec, e])
22 env.Compare([d1, d2])
/nanopb-2.7.6/tests/alltypes_pointer/
DSConscript4 Import("env", "malloc_env")
7 env.Command("alltypes.proto", "#alltypes/alltypes.proto", c)
9 env.NanopbProto(["alltypes", "alltypes.options"])
22 env.RunTest(enc)
23 env.Compare(["encode_alltypes_pointer.output", "$BUILD/alltypes/encode_alltypes.output"])
27 if env.get("VALGRIND"):
28 kwargs['COMMAND'] = env['VALGRIND']
31 env.RunTest("decode_alltypes.output", [dec, "encode_alltypes_pointer.output"], **kwargs)
34 env.RunTest("optionals.output", enc, ARGS = ['1'])
35 env.Compare(["optionals.output", "$BUILD/alltypes/optionals.output"])
[all …]
/nanopb-2.7.6/tests/inline/
DSConscript3 Import("env")
5 env.NanopbProto("inline")
6 env.Object("inline.pb.c")
8 env.Match(["inline.pb.h", "inline.expected"])
10 p = env.Program(["inline_unittests.c",
16 env.RunTest(p)

12345