You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
172 lines
6.2 KiB
172 lines
6.2 KiB
// Copyright 2018 The Android Open Source Project
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package {
|
|
// See: http://go/android-license-faq
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
// all of the 'license_kinds' from "frameworks_native_license"
|
|
// to get the below license kinds:
|
|
// SPDX-license-identifier-Apache-2.0
|
|
default_applicable_licenses: ["frameworks_native_license"],
|
|
}
|
|
|
|
cc_test {
|
|
name: "libsurfaceflinger_unittest",
|
|
defaults: ["surfaceflinger_defaults"],
|
|
test_suites: ["device-tests"],
|
|
sanitize: {
|
|
// Using the address sanitizer not only helps uncover issues in the code
|
|
// covered by the tests, but also covers some of the tricky injection of
|
|
// fakes the unit tests currently do.
|
|
//
|
|
// Note: If you get an runtime link error like:
|
|
//
|
|
// CANNOT LINK EXECUTABLE "/data/local/tmp/libsurfaceflinger_unittest": library "libclang_rt.asan-aarch64-android.so" not found
|
|
//
|
|
// it is because the address sanitizer shared objects are not installed
|
|
// by default in the system image.
|
|
//
|
|
// You can either "make dist tests" before flashing, or set this
|
|
// option to false temporarily.
|
|
address: true,
|
|
},
|
|
srcs: [
|
|
":libsurfaceflinger_sources",
|
|
"libsurfaceflinger_unittest_main.cpp",
|
|
"CachingTest.cpp",
|
|
"CompositionTest.cpp",
|
|
"DispSyncSourceTest.cpp",
|
|
"DisplayIdentificationTest.cpp",
|
|
"DisplayIdGeneratorTest.cpp",
|
|
"DisplayTransactionTest.cpp",
|
|
"DisplayDevice_GetBestColorModeTest.cpp",
|
|
"DisplayDevice_SetProjectionTest.cpp",
|
|
"EventThreadTest.cpp",
|
|
"FpsReporterTest.cpp",
|
|
"FpsTest.cpp",
|
|
"FramebufferSurfaceTest.cpp",
|
|
"FrameTimelineTest.cpp",
|
|
"GameModeTest.cpp",
|
|
"HWComposerTest.cpp",
|
|
"OneShotTimerTest.cpp",
|
|
"LayerHistoryTest.cpp",
|
|
"LayerInfoTest.cpp",
|
|
"LayerMetadataTest.cpp",
|
|
"MessageQueueTest.cpp",
|
|
"SurfaceFlinger_CreateDisplayTest.cpp",
|
|
"SurfaceFlinger_DestroyDisplayTest.cpp",
|
|
"SurfaceFlinger_GetDisplayNativePrimariesTest.cpp",
|
|
"SurfaceFlinger_HandleTransactionLockedTest.cpp",
|
|
"SurfaceFlinger_NotifyPowerBoostTest.cpp",
|
|
"SurfaceFlinger_HotplugTest.cpp",
|
|
"SurfaceFlinger_OnInitializeDisplaysTest.cpp",
|
|
"SurfaceFlinger_SetDisplayStateTest.cpp",
|
|
"SurfaceFlinger_SetPowerModeInternalTest.cpp",
|
|
"SurfaceFlinger_SetupNewDisplayDeviceInternalTest.cpp",
|
|
"SchedulerTest.cpp",
|
|
"SchedulerUtilsTest.cpp",
|
|
"SetFrameRateTest.cpp",
|
|
"RefreshRateConfigsTest.cpp",
|
|
"RefreshRateSelectionTest.cpp",
|
|
"RefreshRateStatsTest.cpp",
|
|
"RegionSamplingTest.cpp",
|
|
"TimeStatsTest.cpp",
|
|
"FrameTracerTest.cpp",
|
|
"TimerTest.cpp",
|
|
"TransactionApplicationTest.cpp",
|
|
"TransactionFrameTracerTest.cpp",
|
|
"TransactionSurfaceFrameTest.cpp",
|
|
"TunnelModeEnabledReporterTest.cpp",
|
|
"StrongTypingTest.cpp",
|
|
"VSyncDispatchTimerQueueTest.cpp",
|
|
"VSyncDispatchRealtimeTest.cpp",
|
|
"VsyncModulatorTest.cpp",
|
|
"VSyncPredictorTest.cpp",
|
|
"VSyncReactorTest.cpp",
|
|
"VsyncConfigurationTest.cpp",
|
|
"mock/DisplayHardware/MockComposer.cpp",
|
|
"mock/DisplayHardware/MockHWC2.cpp",
|
|
"mock/DisplayHardware/MockPowerAdvisor.cpp",
|
|
"mock/MockEventThread.cpp",
|
|
"mock/MockFrameTimeline.cpp",
|
|
"mock/MockFrameTracer.cpp",
|
|
"mock/MockMessageQueue.cpp",
|
|
"mock/MockNativeWindowSurface.cpp",
|
|
"mock/MockSurfaceInterceptor.cpp",
|
|
"mock/MockTimeStats.cpp",
|
|
"mock/MockVsyncController.cpp",
|
|
"mock/MockVSyncTracker.cpp",
|
|
"mock/system/window/MockNativeWindow.cpp",
|
|
],
|
|
static_libs: [
|
|
"android.hardware.graphics.composer@2.1",
|
|
"android.hardware.graphics.composer@2.2",
|
|
"android.hardware.graphics.composer@2.3",
|
|
"android.hardware.graphics.composer@2.4",
|
|
"android.hardware.power@1.0",
|
|
"android.hardware.power@1.1",
|
|
"android.hardware.power@1.2",
|
|
"android.hardware.power@1.3",
|
|
"android.hardware.power-V1-cpp",
|
|
"libcompositionengine_mocks",
|
|
"libcompositionengine",
|
|
"libframetimeline",
|
|
"libgmock",
|
|
"libgui_mocks",
|
|
"liblayers_proto",
|
|
"libperfetto_client_experimental",
|
|
"librenderengine_mocks",
|
|
"librenderengine",
|
|
"libserviceutils",
|
|
"libtimestats",
|
|
"libtimestats_atoms_proto",
|
|
"libtimestats_proto",
|
|
"libtrace_proto",
|
|
"perfetto_trace_protos",
|
|
],
|
|
shared_libs: [
|
|
"android.hardware.configstore-utils",
|
|
"android.hardware.configstore@1.0",
|
|
"android.hardware.configstore@1.1",
|
|
"android.hardware.graphics.allocator@2.0",
|
|
"android.hardware.graphics.allocator@3.0",
|
|
"android.hardware.graphics.common@1.2",
|
|
"libbase",
|
|
"libbinder",
|
|
"libcutils",
|
|
"libEGL",
|
|
"libfmq",
|
|
"libGLESv1_CM",
|
|
"libGLESv2",
|
|
"libgui",
|
|
"libhidlbase",
|
|
"libinput",
|
|
"liblog",
|
|
"libnativewindow",
|
|
"libprocessgroup",
|
|
"libprotobuf-cpp-lite",
|
|
"libSurfaceFlingerProp",
|
|
"libsync",
|
|
"libui",
|
|
"libutils",
|
|
],
|
|
header_libs: [
|
|
"android.hardware.graphics.composer@2.1-command-buffer",
|
|
"android.hardware.graphics.composer@2.2-command-buffer",
|
|
"android.hardware.graphics.composer@2.3-command-buffer",
|
|
"android.hardware.graphics.composer@2.4-command-buffer",
|
|
"libsurfaceflinger_headers",
|
|
],
|
|
}
|