1// Copyright 2023 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_defaults {
20    name: "evsmanagerd_fuzz_default",
21    defaults: ["evsmanagerd_defaults"],
22    shared_libs: [
23        "libcamera_client",
24        "libnativewindow",
25    ],
26    static_libs: [
27        "libbinder_random_parcel",
28        "libevsmanagerd_static",
29        "liblog",
30        "libmockevshal",
31        "libgmock",
32        "libgtest",
33    ],
34    header_libs: ["libmockevshal_headers"],
35    srcs: [
36        "Common.cpp",
37    ],
38    cflags: [
39        "-Wno-unused-parameter",
40    ],
41    fuzz_config: {
42        cc: [
43            "[email protected]",
44            "[email protected]",
45        ],
46        // Android > Automotive > Embedded > Test Bugs
47        componentid: 162915,
48        // aae-fuzz-bugs
49        hotlists: ["1986127"],
50        libfuzzer_options: [
51            "timeout=120",
52        ],
53    },
54}
55
56cc_fuzz {
57    name: "evs_enumerator_fuzzer",
58    defaults: [
59        "evsmanagerd_fuzz_default",
60        "service_fuzzer_defaults",
61    ],
62    srcs: [
63        //":evsmanagerd_sources",
64        "EnumeratorFuzzer.cpp",
65    ],
66    fuzz_config: {
67        cc: [
68            "[email protected]",
69        ],
70    },
71}
72
73cc_fuzz {
74    name: "evsmanagerd_halcamera_fuzzer",
75    srcs: [
76        "HalCameraFuzzer.cpp",
77    ],
78    defaults: ["evsmanagerd_fuzz_default"],
79}
80
81cc_fuzz {
82    name: "evsmanagerd_virtualcamera_fuzzer",
83    srcs: [
84        "VirtualCameraFuzzer.cpp",
85    ],
86    defaults: ["evsmanagerd_fuzz_default"],
87    fuzz_config: {
88        libfuzzer_options: [
89            "max_len=4096",
90        ],
91    },
92}
93
94cc_fuzz {
95    name: "evsmanagerd_haldisplay_fuzzer",
96    srcs: [
97        "HalDisplayFuzzer.cpp",
98    ],
99    defaults: ["evsmanagerd_fuzz_default"],
100}
101