1// Copyright 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 25filegroup { 26 name: "libsurfaceflinger_mock_sources", 27 srcs: [ 28 "mock/DisplayHardware/MockPowerHalController.cpp", 29 "mock/DisplayHardware/MockComposer.cpp", 30 "mock/DisplayHardware/MockHWC2.cpp", 31 "mock/DisplayHardware/MockIPower.cpp", 32 "mock/DisplayHardware/MockPowerHintSessionWrapper.cpp", 33 "mock/DisplayHardware/MockPowerAdvisor.cpp", 34 "mock/MockEventThread.cpp", 35 "mock/MockFrameTimeline.cpp", 36 "mock/MockFrameTracer.cpp", 37 "mock/MockNativeWindowSurface.cpp", 38 "mock/MockTimeStats.cpp", 39 "mock/MockVsyncController.cpp", 40 "mock/MockVSyncDispatch.cpp", 41 "mock/MockVSyncTracker.cpp", 42 "mock/system/window/MockNativeWindow.cpp", 43 ], 44} 45 46cc_aconfig_library { 47 name: "libsurfaceflingerflags_test", 48 aconfig_declarations: "surfaceflinger_flags", 49 mode: "test", 50} 51 52cc_test { 53 name: "libsurfaceflinger_unittest", 54 defaults: [ 55 "libsurfaceflinger_mocks_defaults", 56 "skia_renderengine_deps", 57 "surfaceflinger_defaults", 58 ], 59 test_suites: ["device-tests"], 60 static_libs: ["libc++fs"], 61 srcs: [ 62 ":libsurfaceflinger_mock_sources", 63 ":libsurfaceflinger_sources", 64 "libsurfaceflinger_unittest_main.cpp", 65 "ActiveDisplayRotationFlagsTest.cpp", 66 "BackgroundExecutorTest.cpp", 67 "CommitTest.cpp", 68 "CompositionTest.cpp", 69 "DaltonizerTest.cpp", 70 "DisplayIdGeneratorTest.cpp", 71 "DisplayTransactionTest.cpp", 72 "DisplayDevice_GetBestColorModeTest.cpp", 73 "DisplayDevice_SetDisplayBrightnessTest.cpp", 74 "DisplayDevice_SetProjectionTest.cpp", 75 "DisplayModeControllerTest.cpp", 76 "EventThreadTest.cpp", 77 "FlagManagerTest.cpp", 78 "FpsReporterTest.cpp", 79 "FpsTest.cpp", 80 "FramebufferSurfaceTest.cpp", 81 "FrameRateOverrideMappingsTest.cpp", 82 "FrameRateSelectionPriorityTest.cpp", 83 "FrameRateSelectionStrategyTest.cpp", 84 "FrameTimelineTest.cpp", 85 "GameModeTest.cpp", 86 "HWComposerTest.cpp", 87 "OneShotTimerTest.cpp", 88 "LayerHistoryTest.cpp", 89 "LayerHistoryIntegrationTest.cpp", 90 "LayerInfoTest.cpp", 91 "LayerMetadataTest.cpp", 92 "LayerHierarchyTest.cpp", 93 "LayerLifecycleManagerTest.cpp", 94 "LayerSnapshotTest.cpp", 95 "LayerTest.cpp", 96 "LayerTestUtils.cpp", 97 "MessageQueueTest.cpp", 98 "PowerAdvisorTest.cpp", 99 "SmallAreaDetectionAllowMappingsTest.cpp", 100 "SurfaceFlinger_ColorMatrixTest.cpp", 101 "SurfaceFlinger_CreateDisplayTest.cpp", 102 "SurfaceFlinger_DestroyDisplayTest.cpp", 103 "SurfaceFlinger_DisplayModeSwitching.cpp", 104 "SurfaceFlinger_DisplayTransactionCommitTest.cpp", 105 "SurfaceFlinger_ExcludeDolbyVisionTest.cpp", 106 "SurfaceFlinger_FoldableTest.cpp", 107 "SurfaceFlinger_GetDisplayNativePrimariesTest.cpp", 108 "SurfaceFlinger_GetDisplayStatsTest.cpp", 109 "SurfaceFlinger_HdrOutputControlTest.cpp", 110 "SurfaceFlinger_HotplugTest.cpp", 111 "SurfaceFlinger_InitializeDisplaysTest.cpp", 112 "SurfaceFlinger_NotifyExpectedPresentTest.cpp", 113 "SurfaceFlinger_NotifyPowerBoostTest.cpp", 114 "SurfaceFlinger_PowerHintTest.cpp", 115 "SurfaceFlinger_SetDisplayStateTest.cpp", 116 "SurfaceFlinger_SetPowerModeInternalTest.cpp", 117 "SurfaceFlinger_SetupNewDisplayDeviceInternalTest.cpp", 118 "SurfaceFlinger_UpdateLayerMetadataSnapshotTest.cpp", 119 "SchedulerTest.cpp", 120 "SetFrameRateTest.cpp", 121 "RefreshRateSelectorTest.cpp", 122 "RefreshRateStatsTest.cpp", 123 "RegionSamplingTest.cpp", 124 "TestableScheduler.cpp", 125 "TimeStatsTest.cpp", 126 "FrameTracerTest.cpp", 127 "TransactionApplicationTest.cpp", 128 "TransactionFrameTracerTest.cpp", 129 "TransactionProtoParserTest.cpp", 130 "TransactionSurfaceFrameTest.cpp", 131 "TransactionTraceWriterTest.cpp", 132 "TransactionTracingTest.cpp", 133 "TunnelModeEnabledReporterTest.cpp", 134 "VSyncCallbackRegistrationTest.cpp", 135 "VSyncDispatchTimerQueueTest.cpp", 136 "VSyncDispatchRealtimeTest.cpp", 137 "VsyncModulatorTest.cpp", 138 "VSyncPredictorTest.cpp", 139 "VSyncReactorTest.cpp", 140 "VsyncConfigurationTest.cpp", 141 "VsyncScheduleTest.cpp", 142 "WindowInfosListenerInvokerTest.cpp", 143 ], 144} 145 146cc_defaults { 147 name: "libsurfaceflinger_mocks_defaults", 148 defaults: [ 149 "android.hardware.graphics.common-ndk_static", 150 "android.hardware.graphics.composer3-ndk_static", 151 "android.hardware.power-ndk_static", 152 "librenderengine_deps", 153 "libsurfaceflinger_common_test_deps", 154 ], 155 static_libs: [ 156 "android.hardware.common-V2-ndk", 157 "android.hardware.common.fmq-V1-ndk", 158 "android.hardware.graphics.composer@2.1", 159 "android.hardware.graphics.composer@2.2", 160 "android.hardware.graphics.composer@2.3", 161 "android.hardware.graphics.composer@2.4", 162 "android.hardware.power@1.0", 163 "android.hardware.power@1.1", 164 "android.hardware.power@1.2", 165 "android.hardware.power@1.3", 166 "libaidlcommonsupport", 167 "libcompositionengine_mocks", 168 "libcompositionengine", 169 "libframetimeline", 170 "libgmock", 171 "libgui_mocks", 172 "liblayers_proto", 173 "libperfetto_client_experimental", 174 "librenderengine", 175 "librenderengine_mocks", 176 "libscheduler", 177 "libserviceutils", 178 "libtimestats", 179 "libtimestats_atoms_proto", 180 "libtimestats_proto", 181 "libtonemap", 182 "perfetto_trace_protos", 183 ], 184 shared_libs: [ 185 "android.hardware.configstore-utils", 186 "android.hardware.configstore@1.0", 187 "android.hardware.configstore@1.1", 188 "android.hardware.graphics.allocator@2.0", 189 "android.hardware.graphics.allocator@3.0", 190 "android.hardware.graphics.common@1.2", 191 "libbase", 192 "libbinder", 193 "libbinder_ndk", 194 "libcutils", 195 "libEGL", 196 "libfmq", 197 "libGLESv1_CM", 198 "libGLESv2", 199 "libgui", 200 "libhidlbase", 201 "libinput", 202 "liblog", 203 "libnativewindow", 204 "libpowermanager", 205 "libprocessgroup", 206 "libprotobuf-cpp-lite", 207 "libSurfaceFlingerProp", 208 "libsync", 209 "libui", 210 "libutils", 211 ], 212 header_libs: [ 213 "android.hardware.graphics.composer3-command-buffer", 214 "android.hardware.graphics.composer@2.1-command-buffer", 215 "android.hardware.graphics.composer@2.2-command-buffer", 216 "android.hardware.graphics.composer@2.3-command-buffer", 217 "android.hardware.graphics.composer@2.4-command-buffer", 218 "libscheduler_test_headers", 219 "libsurfaceflinger_headers", 220 ], 221} 222 223cc_library_headers { 224 name: "libsurfaceflinger_mocks_headers", 225 export_include_dirs: ["."], 226} 227