blob: 0f9060dbdb25f843aff0fd3f465b91161a9010e3 [file] [log] [blame]
Alec Mourib2089a32022-01-15 00:34:20 +00001/*
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
Bob Badourc26d6d52022-02-10 13:41:04 -080018package {
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
Alec Mourib2089a32022-01-15 00:34:20 +000027cc_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",
Leon Scroggins IIIbfab5052023-03-24 15:45:46 -040072 "-Wno-unused-function",
Alec Mourib2089a32022-01-15 00:34:20 +000073 ],
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}
Alec Mouri8c59b272022-01-15 00:34:20 +000091
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}
Chethan Kumar R E70750f22021-11-23 17:39:01 +0530105
106cc_fuzz {
107 name: "surfaceflinger_scheduler_fuzzer",
108 defaults: [
109 "surfaceflinger_fuzz_defaults",
110 ],
111 srcs: [
112 "surfaceflinger_scheduler_fuzzer.cpp",
113 ],
114}
Chethan Kumar R E041415a2021-11-23 17:42:22 +0530115
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}
Chethan Kumar R Ecd5229e2021-11-23 17:45:54 +0530131
132cc_fuzz {
133 name: "surfaceflinger_frametracer_fuzzer",
134 defaults: [
135 "surfaceflinger_fuzz_defaults",
136 ],
137 srcs: [
138 "surfaceflinger_frametracer_fuzzer.cpp",
139 ],
140}
Pawan Wagh1dd5f382023-06-01 23:43:10 +0000141
142cc_fuzz {
143 name: "surfaceflinger_service_fuzzer",
144 defaults: [
145 "surfaceflinger_fuzz_defaults",
146 "service_fuzzer_defaults",
147 "fuzzer_disable_leaks",
148 ],
149 srcs: [
150 "surfaceflinger_service_fuzzer.cpp",
151 ],
152 fuzz_config: {
153 triage_assignee: "waghpawan@google.com",
154 },
155}