summaryrefslogtreecommitdiffstats
path: root/CAN-binder/libs/nanopb/tests/fuzztest/SConscript
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-02 18:29:37 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-02 18:29:37 +0200
commitb9e1b4435a406a8a27c078ea05dee1240e51704a (patch)
tree3bd5e75d001d0c1d57710c47375af5c8ba84c26c /CAN-binder/libs/nanopb/tests/fuzztest/SConscript
parent0242c26c2f5dc96387bca7efb118364c800f4ee7 (diff)
Added external libraries from openXC CMake files.
Now libraries are cleanly included and built. Change-Id: Iaa85639578b55b2da8357bc438426403e2cca8de Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/libs/nanopb/tests/fuzztest/SConscript')
-rw-r--r--CAN-binder/libs/nanopb/tests/fuzztest/SConscript43
1 files changed, 0 insertions, 43 deletions
diff --git a/CAN-binder/libs/nanopb/tests/fuzztest/SConscript b/CAN-binder/libs/nanopb/tests/fuzztest/SConscript
deleted file mode 100644
index d2fb689c..00000000
--- a/CAN-binder/libs/nanopb/tests/fuzztest/SConscript
+++ /dev/null
@@ -1,43 +0,0 @@
-# Run a fuzz test to verify robustness against corrupted/malicious data.
-
-Import("env", "malloc_env")
-
-def set_pkgname(src, dst, pkgname):
- data = open(str(src)).read()
- placeholder = '// package name placeholder'
- assert placeholder in data
- data = data.replace(placeholder, 'package %s;' % pkgname)
- open(str(dst), 'w').write(data)
-
-# We want both pointer and static versions of the AllTypes message
-# Prefix them with package name.
-env.Command("alltypes_static.proto", "#alltypes/alltypes.proto",
- lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_static'))
-env.Command("alltypes_pointer.proto", "#alltypes/alltypes.proto",
- lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_pointer'))
-
-p1 = env.NanopbProto(["alltypes_pointer", "alltypes_pointer.options"])
-p2 = env.NanopbProto(["alltypes_static", "alltypes_static.options"])
-fuzz = malloc_env.Program(["fuzztest.c",
- "alltypes_pointer.pb.c",
- "alltypes_static.pb.c",
- "$COMMON/pb_encode_with_malloc.o",
- "$COMMON/pb_decode_with_malloc.o",
- "$COMMON/pb_common_with_malloc.o",
- "$COMMON/malloc_wrappers.o"])
-
-env.RunTest(fuzz)
-
-fuzzstub = malloc_env.Program(["fuzzstub.c",
- "alltypes_pointer.pb.c",
- "alltypes_static.pb.c",
- "$COMMON/pb_encode_with_malloc.o",
- "$COMMON/pb_decode_with_malloc.o",
- "$COMMON/pb_common_with_malloc.o",
- "$COMMON/malloc_wrappers.o"])
-
-generate_message = malloc_env.Program(["generate_message.c",
- "alltypes_static.pb.c",
- "$COMMON/pb_encode.o",
- "$COMMON/pb_common.o"])
-