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 // See: http://go/android-license-faq 7 // A large-scale-change added 'default_applicable_licenses' to import 8 // all of the 'license_kinds' from "frameworks_native_license" 9 // to get the below license kinds: 10 // SPDX-license-identifier-Apache-2.0 11 default_applicable_licenses: ["frameworks_native_license"], 12} 13 14cc_test { 15 name: "libgui_test", 16 test_suites: ["device-tests"], 17 18 cflags: [ 19 "-Wall", 20 "-Werror", 21 ], 22 23 srcs: [ 24 "LibGuiMain.cpp", // Custom gtest entrypoint 25 "BLASTBufferQueue_test.cpp", 26 "BufferItemConsumer_test.cpp", 27 "BufferQueue_test.cpp", 28 "CompositorTiming_test.cpp", 29 "CpuConsumer_test.cpp", 30 "EndToEndNativeInputTest.cpp", 31 "DisplayInfo_test.cpp", 32 "DisplayedContentSampling_test.cpp", 33 "FillBuffer.cpp", 34 "GLTest.cpp", 35 "IGraphicBufferProducer_test.cpp", 36 "Malicious.cpp", 37 "MultiTextureConsumer_test.cpp", 38 "RegionSampling_test.cpp", 39 "StreamSplitter_test.cpp", 40 "SurfaceTextureClient_test.cpp", 41 "SurfaceTextureFBO_test.cpp", 42 "SurfaceTextureGLThreadToGL_test.cpp", 43 "SurfaceTextureGLToGL_test.cpp", 44 "SurfaceTextureGL_test.cpp", 45 "SurfaceTextureMultiContextGL_test.cpp", 46 "Surface_test.cpp", 47 "TextureRenderer.cpp", 48 "VsyncEventData_test.cpp", 49 "WindowInfo_test.cpp", 50 ], 51 52 shared_libs: [ 53 "android.hardware.configstore@1.0", 54 "android.hardware.configstore-utils", 55 "libSurfaceFlingerProp", 56 "libbase", 57 "liblog", 58 "libEGL", 59 "libGLESv1_CM", 60 "libGLESv2", 61 "libbinder", 62 "libcutils", 63 "libgui", 64 "libhidlbase", 65 "libinput", 66 "libui", 67 "libutils", 68 "libnativewindow", 69 ], 70 71 header_libs: ["libsurfaceflinger_headers"], 72} 73 74// Build the tests that need to run with both 32bit and 64bit. 75cc_test { 76 name: "libgui_multilib_test", 77 test_suites: ["device-tests"], 78 79 cflags: [ 80 "-Wall", 81 "-Werror", 82 ], 83 84 srcs: [ 85 "DisplayEventStructLayout_test.cpp", 86 ], 87 88 shared_libs: [ 89 "libgui", 90 ], 91 92 compile_multilib: "both", 93 94 header_libs: ["libsurfaceflinger_headers"], 95 data: [ 96 ":libgui_test", 97 ], 98} 99 100cc_test { 101 name: "SamplingDemo", 102 103 cflags: [ 104 "-Wall", 105 "-Werror", 106 ], 107 108 srcs: [ 109 "SamplingDemo.cpp", 110 ], 111 112 shared_libs: [ 113 "libbinder", 114 "libcutils", 115 "libgui", 116 "liblog", 117 "libui", 118 "libutils", 119 ], 120} 121