| 1 |
load("@rules_cc//cc:defs.bzl", "cc_binary") |
| 2 |
load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test") |
| 3 |
|
| 4 |
cc_fuzz_test( |
| 5 |
name = "bootstrap_fuzz_test", |
| 6 |
size = "small", |
| 7 |
srcs = ["bootstrap_fuzz_test.cc"], |
| 8 |
copts = ["-UNDEBUG"], |
| 9 |
corpus = ["//tools/toktok-fuzzer/corpus:bootstrap_fuzz_test"], |
| 10 |
deps = [ |
| 11 |
"//c-toxcore/testing/support", |
| 12 |
"//c-toxcore/toxcore:tox", |
| 13 |
"//c-toxcore/toxcore:tox_dispatch", |
| 14 |
"//c-toxcore/toxcore:tox_events", |
| 15 |
], |
| 16 |
) |
| 17 |
|
| 18 |
cc_fuzz_test( |
| 19 |
name = "e2e_fuzz_test", |
| 20 |
size = "small", |
| 21 |
srcs = ["e2e_fuzz_test.cc"], |
| 22 |
copts = ["-UNDEBUG"], |
| 23 |
corpus = ["//tools/toktok-fuzzer/corpus:e2e_fuzz_test"], |
| 24 |
data = ["//tools/toktok-fuzzer/init:e2e_fuzz_test.dat"], |
| 25 |
deps = [ |
| 26 |
"//c-toxcore/testing/support", |
| 27 |
"//c-toxcore/toxcore:crypto_core", |
| 28 |
"//c-toxcore/toxcore:tox", |
| 29 |
"//c-toxcore/toxcore:tox_dispatch", |
| 30 |
"//c-toxcore/toxcore:tox_events", |
| 31 |
], |
| 32 |
) |
| 33 |
|
| 34 |
cc_fuzz_test( |
| 35 |
name = "toxsave_fuzz_test", |
| 36 |
size = "small", |
| 37 |
srcs = ["toxsave_fuzz_test.cc"], |
| 38 |
copts = ["-UNDEBUG"], |
| 39 |
corpus = ["//tools/toktok-fuzzer/corpus:toxsave_fuzz_test"], |
| 40 |
deps = [ |
| 41 |
"//c-toxcore/testing/support", |
| 42 |
"//c-toxcore/toxcore:tox", |
| 43 |
], |
| 44 |
) |
| 45 |
|
| 46 |
cc_binary( |
| 47 |
name = "protodump", |
| 48 |
srcs = ["protodump.cc"], |
| 49 |
copts = ["-UNDEBUG"], |
| 50 |
deps = [ |
| 51 |
"//c-toxcore/testing/support", |
| 52 |
"//c-toxcore/toxcore:tox", |
| 53 |
"//c-toxcore/toxcore:tox_dispatch", |
| 54 |
"//c-toxcore/toxcore:tox_events", |
| 55 |
"//c-toxcore/toxcore:util", |
| 56 |
], |
| 57 |
) |
| 58 |
|
| 59 |
genrule( |
| 60 |
name = "e2e_fuzz_test_init", |
| 61 |
outs = [ |
| 62 |
"e2e_fuzz_test_init.dat", |
| 63 |
"e2e_fuzz_test_bootstrap.dat", |
| 64 |
], |
| 65 |
cmd = "$(location :protodump) $(location e2e_fuzz_test_init.dat) $(location e2e_fuzz_test_bootstrap.dat)", |
| 66 |
tags = ["manual"], |
| 67 |
tools = [":protodump"], |
| 68 |
) |