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 "aae-engprod-fuzz@google.com", 78 "kathan@google.com", 79 ], 80 // Android > Automotive > Embedded > Test Bugs 81 componentid: 162915, 82 // aae-fuzz-bugs 83 hotlists: ["1986127"], 84 libfuzzer_options: [ 85 "timeout=120", 86 ], 87 }, 88} 89 90cc_fuzz { 91 name: "computepipe_pixel_mem_handle_fuzzer", 92 defaults: ["libcomputepipefuzz-defaults"], 93 srcs: [ 94 "PixelMemHandleFuzzer.cpp", 95 ], 96 shared_libs: [ 97 "libprotobuf-cpp-full", 98 ], 99 static_libs: [ 100 "libcomputepipeprotosfuzz", 101 "libprotobuf-mutator", 102 ], 103} 104 105cc_fuzz { 106 name: "computepipe_pixel_stream_manager_fuzzer", 107 defaults: ["libcomputepipefuzz-defaults"], 108 srcs: [ 109 "PixelStreamManagerFuzzer.cpp", 110 ], 111 shared_libs: [ 112 "libprotobuf-cpp-full", 113 ], 114 static_libs: [ 115 "libcomputepipeprotosfuzz", 116 "libprotobuf-mutator", 117 ], 118} 119 120cc_fuzz { 121 name: "computepipe_semantic_manager_fuzzer", 122 defaults: ["libcomputepipefuzz-defaults"], 123 srcs: [ 124 "SemanticManagerFuzzer.cpp", 125 ], 126} 127 128cc_fuzz { 129 name: "video_input_manager_fuzzer", 130 defaults: ["libcomputepipefuzz-defaults"], 131 cppflags:[ 132 "-fexceptions", 133 ], 134 srcs: [ 135 "VideoInputManagerFuzzer.cpp", 136 ], 137 data: [ 138 "corpus/video_input_manager/*" 139 ], 140} 141 142cc_fuzz { 143 name: "local_prebuild_graph_fuzzer", 144 defaults: ["libcomputepipefuzz-defaults"], 145 cppflags:[ 146 "-fexceptions", 147 ], 148 static_libs: [ 149 "computepipe_prebuilt_graph", 150 ], 151 shared_libs: [ 152 "libstubgraphimpl", 153 ], 154 include_dirs: [ 155 "packages/services/Car/cpp/computepipe", 156 "packages/services/Car/cpp/computepipe/runner/graph", 157 ], 158 srcs: [ 159 "LocalPrebuildGraphFuzzer.cpp", 160 ], 161} 162 163cc_fuzz { 164 name: "grpc_graph_fuzzer", 165 defaults: ["libcomputepipefuzz-defaults"], 166 cppflags:[ 167 "-fexceptions", 168 ], 169 static_libs: [ 170 "computepipe_grpc_graph_proto", 171 "computepipe_grpc_graph", 172 ], 173 shared_libs: [ 174 "libgrpc++", 175 "libprotobuf-cpp-full", 176 ], 177 include_dirs: [ 178 "packages/services/Car/cpp/computepipe", 179 "packages/services/Car/cpp/computepipe/runner/graph", 180 ], 181 srcs: [ 182 "GrpcGraphFuzzer.cpp", 183 ], 184} 185