Statically link missing libraries to libsurfaceflinger_unittest
Some targets do not have the library in their system or
vendor image so the test fails to run.
Fixes: 170341496
Test: atest -a libsurfaceflinger_unittest on cf_x86_64_phone-userdebug
Change-Id: I61e7702e6b36f218bebc7c87853001861a92741e
diff --git a/services/surfaceflinger/tests/unittests/Android.bp b/services/surfaceflinger/tests/unittests/Android.bp
index 8097a88..18f3745 100644
--- a/services/surfaceflinger/tests/unittests/Android.bp
+++ b/services/surfaceflinger/tests/unittests/Android.bp
@@ -14,7 +14,7 @@
cc_test {
name: "libsurfaceflinger_unittest",
- defaults: ["libsurfaceflinger_defaults"],
+ defaults: ["surfaceflinger_defaults"],
test_suites: ["device-tests"],
sanitize: {
// Using the address sanitizer not only helps uncover issues in the code
@@ -94,22 +94,65 @@
"mock/system/window/MockNativeWindow.cpp",
],
static_libs: [
- "libgmock",
- "libcompositionengine",
+ "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",
"libcompositionengine_mocks",
+ "libcompositionengine",
"libframetimeline",
+ "libgmock",
"libgui_mocks",
+ "liblayers_proto",
"libperfetto_client_experimental",
"librenderengine_mocks",
+ "librenderengine",
+ "libserviceutils",
+ "libtimestats",
+ "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",
+ "android.hardware.power-cpp",
+ "libbase",
+ "libbinder",
+ "libcutils",
+ "libEGL",
+ "libfmq",
+ "libGLESv1_CM",
+ "libGLESv2",
+ "libgui",
+ "libhidlbase",
+ "libinput",
+ "liblog",
+ "libnativewindow",
+ "libprocessgroup",
+ "libprotobuf-cpp-lite",
"libprotoutil",
+ "libstatslog",
"libstatssocket",
- "libtimestats",
- "libtimestats_proto",
+ "libSurfaceFlingerProp",
+ "libsync",
+ "libui",
+ "libutils",
+ "libstatspull",
],
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",
],
}