1// Build the unit tests, 2 3// Build the binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) 4// to integrate with auto-test framework. 5package { 6 default_team: "trendy_team_android_core_graphics_stack", 7 // See: http://go/android-license-faq 8 // A large-scale-change added 'default_applicable_licenses' to import 9 // all of the 'license_kinds' from "frameworks_native_license" 10 // to get the below license kinds: 11 // SPDX-license-identifier-Apache-2.0 12 default_applicable_licenses: ["frameworks_native_license"], 13} 14 15aidl_interface { 16 name: "libgui_test_server_aidl", 17 unstable: true, 18 srcs: ["testserver/aidl/**/*.aidl"], 19 local_include_dir: "testserver/aidl", 20 include_dirs: [ 21 "frameworks/native/aidl/gui", 22 ], 23 backend: { 24 cpp: { 25 enabled: true, 26 additional_shared_libraries: [ 27 "libgui", 28 "libui", 29 ], 30 }, 31 java: { 32 enabled: false, 33 }, 34 ndk: { 35 enabled: false, 36 }, 37 rust: { 38 enabled: false, 39 }, 40 }, 41} 42 43cc_test { 44 name: "libgui_test", 45 test_suites: ["device-tests"], 46 47 defaults: ["libgui-defaults"], 48 49 cppflags: [ 50 "-Wall", 51 "-Werror", 52 "-Wextra", 53 "-Wthread-safety", 54 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true", 55 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_EXTENDEDALLOCATE=true", 56 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_CONSUMER_BASE_OWNS_BQ=true", 57 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_PLATFORM_API_IMPROVEMENTS=true", 58 ], 59 60 srcs: [ 61 "BLASTBufferQueue_test.cpp", 62 "BufferItemConsumer_test.cpp", 63 "BufferQueue_test.cpp", 64 "BufferReleaseChannel_test.cpp", 65 "Choreographer_test.cpp", 66 "CompositorTiming_test.cpp", 67 "CpuConsumer_test.cpp", 68 "DisplayedContentSampling_test.cpp", 69 "DisplayInfo_test.cpp", 70 "EndToEndNativeInputTest.cpp", 71 "FillBuffer.cpp", 72 "FrameRateUtilsTest.cpp", 73 "GLTest.cpp", 74 "IGraphicBufferProducer_test.cpp", 75 "LibGuiMain.cpp", // Custom gtest entrypoint 76 "Malicious.cpp", 77 "MultiTextureConsumer_test.cpp", 78 "RegionSampling_test.cpp", 79 "StreamSplitter_test.cpp", 80 "Surface_test.cpp", 81 "SurfaceTextureClient_test.cpp", 82 "SurfaceTextureFBO_test.cpp", 83 "SurfaceTextureGL_test.cpp", 84 "SurfaceTextureGLThreadToGL_test.cpp", 85 "SurfaceTextureGLToGL_test.cpp", 86 "SurfaceTextureMultiContextGL_test.cpp", 87 "TestServer_test.cpp", 88 "testserver/TestServer.cpp", 89 "testserver/TestServerClient.cpp", 90 "testserver/TestServerHost.cpp", 91 "TextureRenderer.cpp", 92 "VsyncEventData_test.cpp", 93 "WindowInfo_test.cpp", 94 ], 95 96 shared_libs: [ 97 "[email protected]", 98 "android.hardware.configstore-utils", 99 "libSurfaceFlingerProp", 100 "libGLESv1_CM", 101 "libgui_test_server_aidl-cpp", 102 "libinput", 103 "libnativedisplay", 104 ], 105 106 // This needs to get copied over for the test since it's not part of the 107 // platform. 108 data_libs: [ 109 "libgui_test_server_aidl-cpp", 110 ], 111 112 static_libs: [ 113 "libgmock", 114 ], 115 116 header_libs: ["libsurfaceflinger_headers"], 117} 118 119// Build the tests that need to run with both 32bit and 64bit. 120cc_test { 121 name: "libgui_multilib_test", 122 test_suites: ["device-tests"], 123 124 cflags: [ 125 "-Wall", 126 "-Werror", 127 ], 128 129 srcs: [ 130 "DisplayEventStructLayout_test.cpp", 131 ], 132 133 shared_libs: [ 134 "libgui", 135 ], 136 137 compile_multilib: "both", 138 139 header_libs: ["libsurfaceflinger_headers"], 140 data: [ 141 ":libgui_test", 142 ], 143} 144 145cc_test { 146 name: "SamplingDemo", 147 148 cflags: [ 149 "-Wall", 150 "-Werror", 151 ], 152 153 srcs: [ 154 "SamplingDemo.cpp", 155 ], 156 157 shared_libs: [ 158 "libbinder", 159 "libcutils", 160 "libgui", 161 "liblog", 162 "libui", 163 "libutils", 164 ], 165} 166