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 15cc_test { 16 name: "libgui_test", 17 test_suites: ["device-tests"], 18 19 defaults: ["libgui-defaults"], 20 21 cppflags: [ 22 "-Wall", 23 "-Werror", 24 "-Wextra", 25 "-Wthread-safety", 26 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true", 27 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_EXTENDEDALLOCATE=true", 28 ], 29 30 srcs: [ 31 "LibGuiMain.cpp", // Custom gtest entrypoint 32 "BLASTBufferQueue_test.cpp", 33 "BufferItemConsumer_test.cpp", 34 "BufferQueue_test.cpp", 35 "Choreographer_test.cpp", 36 "CompositorTiming_test.cpp", 37 "CpuConsumer_test.cpp", 38 "EndToEndNativeInputTest.cpp", 39 "FrameRateUtilsTest.cpp", 40 "DisplayInfo_test.cpp", 41 "DisplayedContentSampling_test.cpp", 42 "FillBuffer.cpp", 43 "GLTest.cpp", 44 "IGraphicBufferProducer_test.cpp", 45 "Malicious.cpp", 46 "MultiTextureConsumer_test.cpp", 47 "RegionSampling_test.cpp", 48 "StreamSplitter_test.cpp", 49 "SurfaceTextureClient_test.cpp", 50 "SurfaceTextureFBO_test.cpp", 51 "SurfaceTextureGLThreadToGL_test.cpp", 52 "SurfaceTextureGLToGL_test.cpp", 53 "SurfaceTextureGL_test.cpp", 54 "SurfaceTextureMultiContextGL_test.cpp", 55 "Surface_test.cpp", 56 "TextureRenderer.cpp", 57 "VsyncEventData_test.cpp", 58 "WindowInfo_test.cpp", 59 ], 60 61 shared_libs: [ 62 "android.hardware.configstore@1.0", 63 "android.hardware.configstore-utils", 64 "libSurfaceFlingerProp", 65 "libGLESv1_CM", 66 "libinput", 67 "libnativedisplay", 68 ], 69 70 static_libs: [ 71 "libgmock", 72 ], 73 74 header_libs: ["libsurfaceflinger_headers"], 75} 76 77// Build the tests that need to run with both 32bit and 64bit. 78cc_test { 79 name: "libgui_multilib_test", 80 test_suites: ["device-tests"], 81 82 cflags: [ 83 "-Wall", 84 "-Werror", 85 ], 86 87 srcs: [ 88 "DisplayEventStructLayout_test.cpp", 89 ], 90 91 shared_libs: [ 92 "libgui", 93 ], 94 95 compile_multilib: "both", 96 97 header_libs: ["libsurfaceflinger_headers"], 98 data: [ 99 ":libgui_test", 100 ], 101} 102 103cc_test { 104 name: "SamplingDemo", 105 106 cflags: [ 107 "-Wall", 108 "-Werror", 109 ], 110 111 srcs: [ 112 "SamplingDemo.cpp", 113 ], 114 115 shared_libs: [ 116 "libbinder", 117 "libcutils", 118 "libgui", 119 "liblog", 120 "libui", 121 "libutils", 122 ], 123} 124