xref: /aosp_15_r20/frameworks/native/services/surfaceflinger/tests/Android.bp (revision 38e8c45f13ce32b0dcecb25141ffecaf386fa17f)
1// Copyright (C) 2018 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    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_native_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_native_license"],
22    default_team: "trendy_team_android_core_graphics_stack",
23}
24
25cc_test {
26    name: "SurfaceFlinger_test",
27    defaults: [
28        "android.hardware.graphics.common-ndk_shared",
29        "surfaceflinger_defaults",
30        "libsurfaceflinger_common_test_deps",
31        "libsurfaceflinger_proto_deps",
32    ],
33    test_suites: ["device-tests"],
34    srcs: [
35        "BootDisplayMode_test.cpp",
36        "Binder_test.cpp",
37        "BufferGenerator.cpp",
38        "Credentials_test.cpp",
39        "DereferenceSurfaceControl_test.cpp",
40        "DisplayConfigs_test.cpp",
41        "DisplayEventReceiver_test.cpp",
42        "Dumpsys_test.cpp",
43        "EffectLayer_test.cpp",
44        "HdrSdrRatioOverlay_test.cpp",
45        "InvalidHandles_test.cpp",
46        "LayerCallback_test.cpp",
47        "LayerRenderTypeTransaction_test.cpp",
48        "LayerState_test.cpp",
49        "LayerTransaction_test.cpp",
50        "LayerTrustedPresentationListener_test.cpp",
51        "LayerTypeAndRenderTypeTransaction_test.cpp",
52        "LayerTypeTransaction_test.cpp",
53        "LayerUpdate_test.cpp",
54        "MirrorLayer_test.cpp",
55        "MultiDisplayLayerBounds_test.cpp",
56        "RefreshRateOverlay_test.cpp",
57        "RelativeZ_test.cpp",
58        "ReleaseBufferCallback_test.cpp",
59        "ScreenCapture_test.cpp",
60        "SetFrameRate_test.cpp",
61        "SetGeometry_test.cpp",
62        "TextureFiltering_test.cpp",
63        "VirtualDisplay_test.cpp",
64        "WindowInfosListener_test.cpp",
65    ],
66    data: ["SurfaceFlinger_test.filter"],
67    static_libs: [
68        "[email protected]",
69        "libsurfaceflinger_common",
70    ],
71    shared_libs: [
72        "[email protected]",
73        "libandroid",
74        "libbase",
75        "libbinder",
76        "libcutils",
77        "libEGL",
78        "libGLESv2",
79        "libgui",
80        "liblog",
81        "libnativewindow",
82        "libprotobuf-cpp-full",
83        "libui",
84        "libutils",
85        "server_configurable_flags",
86    ],
87    header_libs: [
88        "libnativewindow_headers",
89    ],
90}
91
92cc_defaults {
93    name: "ipc_defaults",
94    cflags: [
95        "-Wall",
96        "-Werror",
97    ],
98}
99
100cc_test {
101    name: "IPC_test",
102    defaults: ["ipc_defaults"],
103    test_suites: ["device-tests"],
104    srcs: [
105        "BufferGenerator.cpp",
106        "IPC_test.cpp",
107    ],
108    cppflags: [
109        "-Wall",
110        "-Werror",
111        "-Wformat",
112        "-Wthread-safety",
113        "-Wunused",
114        "-Wunreachable-code",
115    ],
116    shared_libs: [
117        "libandroid",
118        "libbinder",
119        "libcutils",
120        "libEGL",
121        "libGLESv2",
122        "libgui",
123        "liblog",
124        "libprotobuf-cpp-full",
125        "libui",
126        "libutils",
127    ],
128    cpp_std: "experimental",
129    gnu_extensions: false,
130    data: [
131        ":SurfaceFlinger_test",
132    ],
133}
134
135subdirs = [
136    "hwc2",
137    "unittests",
138    "utils",
139    "vsync",
140    "waitforvsync",
141]
142