1// Copyright 2020 The Android Open Source Project
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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19cc_library_static {
20    name: "libcomputepipeprotosfuzz",
21    proto: {
22        export_proto_headers: true,
23    },
24    shared_libs: ["libprotobuf-cpp-full"],
25    cflags: [
26        "-Wall",
27        "-Werror",
28        "-Wno-unused-parameter",
29    ],
30    srcs: [
31        "Fuzz.proto",
32    ],
33}
34
35cc_defaults {
36    name: "libcomputepipefuzz-defaults",
37    cflags: [
38        "-Wall",
39        "-Werror",
40        "-Wno-unused-parameter",
41        "-Wno-unused-variable",
42    ],
43    static_libs: [
44        "computepipe_runner_component",
45        "computepipe_runner_engine",
46        "computepipe_stream_manager",
47        "computepipe_input_manager",
48        "libcomputepipeprotos",
49        "libgtest",
50        "libgmock",
51        "mock_stream_engine_interface",
52    ],
53    shared_libs: [
54        "libbase",
55        "liblog",
56        "libnativewindow",
57        "libmediandk",
58        "libprotobuf-cpp-lite",
59    ],
60    header_libs: [
61        "computepipe_runner_includes",
62        "graph_test_headers",
63    ],
64    include_dirs: [
65        "packages/services/Car/cpp/computepipe",
66        "packages/services/Car/cpp/computepipe/runner/stream_manager",
67        "packages/services/Car/cpp/computepipe/runner/input_manager",
68        "packages/services/Car/cpp/computepipe/runner/input_manager/include",
69        "packages/services/Car/cpp/computepipe/runner/engine",
70        "packages/services/Car/cpp/computepipe/runner/debug_display_manager/include",
71        "packages/services/Car/cpp/computepipe/runner/client_interface/include/",
72        "packages/services/Car/cpp/computepipe/runner/graph/include/",
73    ],
74
75    fuzz_config: {
76        cc: [
77            "guodonghu@google.com",
78            "hanumantsingh@google.com",
79            "kathan@google.com",
80            "smara@google.com",
81            "zhaomingyin@google.com",
82        ],
83    },
84}
85
86cc_fuzz {
87    name: "computepipe_pixel_mem_handle_fuzzer",
88    defaults: ["libcomputepipefuzz-defaults"],
89    srcs: [
90        "PixelMemHandleFuzzer.cpp",
91    ],
92    shared_libs: [
93         "libprotobuf-cpp-full",
94    ],
95    static_libs: [
96        "libcomputepipeprotosfuzz",
97        "libprotobuf-mutator",
98    ],
99}
100
101cc_fuzz {
102    name: "computepipe_pixel_stream_manager_fuzzer",
103    defaults: ["libcomputepipefuzz-defaults"],
104    srcs: [
105        "PixelStreamManagerFuzzer.cpp",
106    ],
107    shared_libs: [
108         "libprotobuf-cpp-full",
109    ],
110    static_libs: [
111        "libcomputepipeprotosfuzz",
112        "libprotobuf-mutator",
113    ],
114}
115
116cc_fuzz {
117    name: "computepipe_semantic_manager_fuzzer",
118    defaults: ["libcomputepipefuzz-defaults"],
119    srcs: [
120        "SemanticManagerFuzzer.cpp",
121    ],
122}
123
124cc_fuzz {
125    name: "video_input_manager_fuzzer",
126    defaults: ["libcomputepipefuzz-defaults"],
127    cppflags:[
128        "-fexceptions",
129    ],
130    srcs: [
131        "VideoInputManagerFuzzer.cpp",
132    ],
133    data: [
134        "corpus/video_input_manager/*"
135    ],
136}
137
138cc_fuzz {
139    name: "local_prebuild_graph_fuzzer",
140    defaults: ["libcomputepipefuzz-defaults"],
141    cppflags:[
142        "-fexceptions",
143    ],
144    static_libs: [
145        "computepipe_prebuilt_graph",
146    ],
147    shared_libs: [
148        "libstubgraphimpl",
149    ],
150    include_dirs: [
151        "packages/services/Car/cpp/computepipe",
152        "packages/services/Car/cpp/computepipe/runner/graph",
153    ],
154    srcs: [
155        "LocalPrebuildGraphFuzzer.cpp",
156    ],
157}
158
159cc_fuzz {
160    name: "grpc_graph_fuzzer",
161    defaults: ["libcomputepipefuzz-defaults"],
162    cppflags:[
163        "-fexceptions",
164    ],
165    static_libs: [
166        "computepipe_grpc_graph_proto",
167    ],
168    shared_libs: [
169        "computepipe_grpc_graph",
170        "libcomputepipeprotos",
171        "libgrpc++",
172        "libprotobuf-cpp-full",
173    ],
174    include_dirs: [
175        "packages/services/Car/cpp/computepipe",
176        "packages/services/Car/cpp/computepipe/runner/graph",
177    ],
178    srcs: [
179        "GrpcGraphFuzzer.cpp",
180    ],
181}
182