| 1 |
# Copyright 2021 gRPC authors. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_package", "grpc_proto_library") |
| 16 |
load("//test/core/util:grpc_fuzzer.bzl", "grpc_proto_fuzzer") |
| 17 |
|
| 18 |
grpc_package( |
| 19 |
name = "test/core/transport/binder/end2end/fuzzers", |
| 20 |
features = [ |
| 21 |
"layering_check", |
| 22 |
], |
| 23 |
) |
| 24 |
|
| 25 |
licenses(["notice"]) |
| 26 |
|
| 27 |
# Protobuf messages for generating inputs. We manually define proto |
| 28 |
# library rule here so the same proto file can be shared between multiple |
| 29 |
# grpc_proto_fuzzer targets |
| 30 |
grpc_proto_library( |
| 31 |
name = "binder_transport_fuzzer_proto", |
| 32 |
srcs = ["binder_transport_fuzzer.proto"], |
| 33 |
) |
| 34 |
|
| 35 |
grpc_cc_library( |
| 36 |
name = "fuzzer_utils", |
| 37 |
srcs = ["fuzzer_utils.cc"], |
| 38 |
language = "c++", |
| 39 |
public_hdrs = ["fuzzer_utils.h"], |
| 40 |
deps = [ |
| 41 |
"binder_transport_fuzzer_proto", |
| 42 |
"//:gpr", |
| 43 |
"//:grpc++", |
| 44 |
"//:grpc++_base", |
| 45 |
"//:grpc_base", |
| 46 |
"//test/core/util:grpc_test_util", |
| 47 |
], |
| 48 |
) |
| 49 |
|
| 50 |
grpc_proto_fuzzer( |
| 51 |
name = "binder_transport_client_fuzzer", |
| 52 |
srcs = [ |
| 53 |
"client_fuzzer.cc", |
| 54 |
], |
| 55 |
corpus = "binder_transport_client_fuzzer_corpus", |
| 56 |
proto = "client.proto", |
| 57 |
tags = [ |
| 58 |
"no_mac", |
| 59 |
"no_windows", |
| 60 |
], |
| 61 |
deps = [ |
| 62 |
"binder_transport_fuzzer_proto", |
| 63 |
":fuzzer_utils", |
| 64 |
"//:gpr", |
| 65 |
"//:grpc++", |
| 66 |
"//:grpc++_base", |
| 67 |
"//:grpc_base", |
| 68 |
"//test/core/util:grpc_test_util", |
| 69 |
], |
| 70 |
) |
| 71 |
|
| 72 |
grpc_proto_fuzzer( |
| 73 |
name = "binder_transport_server_fuzzer", |
| 74 |
srcs = [ |
| 75 |
"server_fuzzer.cc", |
| 76 |
], |
| 77 |
corpus = "binder_transport_server_fuzzer_corpus", |
| 78 |
proto = "server.proto", |
| 79 |
tags = [ |
| 80 |
"no_mac", |
| 81 |
"no_windows", |
| 82 |
], |
| 83 |
deps = [ |
| 84 |
"binder_transport_fuzzer_proto", |
| 85 |
":fuzzer_utils", |
| 86 |
"//:gpr", |
| 87 |
"//:grpc++", |
| 88 |
"//:grpc++_base", |
| 89 |
"//:grpc_base", |
| 90 |
"//test/core/util:grpc_test_util", |
| 91 |
], |
| 92 |
) |