• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18package {
19    // See: http://go/android-license-faq
20    // A large-scale-change added 'default_applicable_licenses' to import
21    // all of the 'license_kinds' from "frameworks_native_license"
22    // to get the below license kinds:
23    //   SPDX-license-identifier-Apache-2.0
24    default_applicable_licenses: ["frameworks_native_license"],
25}
26
27cc_defaults {
28    name: "surfaceflinger_fuzz_defaults",
29    include_dirs: [
30        "frameworks/native/services/surfaceflinger/tests/unittests",
31    ],
32    static_libs: [
33        "android.hardware.graphics.composer@2.1-resources",
34        "libgmock",
35        "libgui_mocks",
36        "libgmock_ndk",
37        "libgmock_main",
38        "libgtest_ndk_c++",
39        "libgmock_main_ndk",
40        "librenderengine_mocks",
41        "perfetto_trace_protos",
42        "libcompositionengine_mocks",
43        "perfetto_trace_protos",
44    ],
45    shared_libs: [
46        "libprotoutil",
47        "libstatssocket",
48        "libstatspull",
49        "libtimestats",
50        "libtimestats_proto",
51        "libprotobuf-cpp-full",
52        "android.hardware.graphics.mapper@2.0",
53        "android.hardware.graphics.mapper@3.0",
54        "android.hardware.graphics.mapper@4.0",
55    ],
56    srcs: [
57        ":libsurfaceflinger_sources",
58        ":libsurfaceflinger_mock_sources",
59    ],
60    defaults: [
61        "libsurfaceflinger_defaults",
62    ],
63    header_libs: [
64        "libui_fuzzableDataspaces_headers",
65        "libsurfaceflinger_headers",
66        "libui_headers",
67    ],
68    cflags: [
69        "-Wno-unused-result",
70        "-Wno-conversion",
71        "-Wno-sign-compare",
72        "-Wno-unused-function",
73    ],
74    fuzz_config: {
75        cc: [
76            "android-media-fuzzing-reports@google.com",
77        ],
78        componentid: 155276,
79    },
80}
81
82cc_fuzz {
83    name: "surfaceflinger_fuzzer",
84    defaults: [
85        "surfaceflinger_fuzz_defaults",
86    ],
87    srcs: [
88        "surfaceflinger_fuzzer.cpp",
89    ],
90}
91
92cc_fuzz {
93    name: "surfaceflinger_displayhardware_fuzzer",
94    defaults: [
95        "surfaceflinger_fuzz_defaults",
96    ],
97    srcs: [
98        "surfaceflinger_displayhardware_fuzzer.cpp",
99    ],
100    header_libs: [
101        "android.hardware.graphics.composer@2.4-command-buffer",
102        "android.hardware.graphics.composer@2.4-hal",
103    ],
104}
105
106cc_fuzz {
107    name: "surfaceflinger_scheduler_fuzzer",
108    defaults: [
109        "surfaceflinger_fuzz_defaults",
110    ],
111    srcs: [
112        "surfaceflinger_scheduler_fuzzer.cpp",
113    ],
114}
115
116cc_fuzz {
117    name: "surfaceflinger_layer_fuzzer",
118    defaults: [
119        "surfaceflinger_fuzz_defaults",
120    ],
121    header_libs: [
122        "libgui_headers",
123    ],
124    static_libs: [
125        "librenderengine",
126    ],
127    srcs: [
128        "surfaceflinger_layer_fuzzer.cpp",
129    ],
130}
131
132cc_fuzz {
133    name: "surfaceflinger_frametracer_fuzzer",
134    defaults: [
135        "surfaceflinger_fuzz_defaults",
136    ],
137    srcs: [
138        "surfaceflinger_frametracer_fuzzer.cpp",
139    ],
140}
141