2022-03-23 08:46:10 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")
|
|
|
|
|
2022-04-03 01:10:09 +08:00
|
|
|
package(features = ["layering_check"])
|
2022-03-23 08:46:10 +08:00
|
|
|
|
2022-03-28 01:17:53 +08:00
|
|
|
cc_library(
|
|
|
|
name = "fuzz_support",
|
|
|
|
srcs = ["fuzz_support.cc"],
|
|
|
|
hdrs = ["fuzz_support.h"],
|
|
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
2022-04-03 01:10:09 +08:00
|
|
|
deps = [
|
|
|
|
"//c-toxcore/toxcore:crypto_core",
|
|
|
|
"//c-toxcore/toxcore:network",
|
|
|
|
"//c-toxcore/toxcore:tox",
|
|
|
|
],
|
2022-03-28 01:17:53 +08:00
|
|
|
)
|
|
|
|
|
2022-04-02 20:11:46 +08:00
|
|
|
cc_library(
|
|
|
|
name = "fuzz_tox",
|
|
|
|
hdrs = ["fuzz_tox.h"],
|
|
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
|
|
deps = [":fuzz_support"],
|
|
|
|
)
|
|
|
|
|
2022-03-23 08:46:10 +08:00
|
|
|
cc_fuzz_test(
|
2022-03-28 05:45:04 +08:00
|
|
|
name = "bootstrap_fuzz_test",
|
2022-03-23 08:46:10 +08:00
|
|
|
srcs = ["bootstrap_harness.cc"],
|
|
|
|
copts = ["-UNDEBUG"],
|
|
|
|
corpus = ["//tools/toktok-fuzzer/corpus:bootstrap_fuzzer"],
|
2022-03-29 06:42:42 +08:00
|
|
|
deps = [
|
|
|
|
":fuzz_support",
|
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-04-03 01:10:09 +08:00
|
|
|
"//c-toxcore/toxcore:tox_dispatch",
|
|
|
|
"//c-toxcore/toxcore:tox_events",
|
|
|
|
"//c-toxcore/toxcore:util",
|
2022-03-29 06:42:42 +08:00
|
|
|
],
|
2022-03-23 08:46:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_fuzz_test(
|
|
|
|
name = "toxsave_fuzz_test",
|
|
|
|
srcs = ["toxsave_harness.cc"],
|
|
|
|
copts = ["-UNDEBUG"],
|
|
|
|
corpus = ["//tools/toktok-fuzzer/corpus:toxsave_fuzzer"],
|
2022-03-29 06:42:42 +08:00
|
|
|
deps = [
|
|
|
|
":fuzz_support",
|
|
|
|
"//c-toxcore/toxcore:tox",
|
|
|
|
],
|
2022-03-23 08:46:10 +08:00
|
|
|
)
|