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 clang: true, 19 cflags: [ 20 "-Wall", 21 "-Werror", 22 ], 23 24 srcs: [ 25 "BLASTBufferQueue_test.cpp", 26 "BufferItemConsumer_test.cpp", 27 "BufferQueue_test.cpp", 28 "CpuConsumer_test.cpp", 29 "EndToEndNativeInputTest.cpp", 30 "DisplayedContentSampling_test.cpp", 31 "FillBuffer.cpp", 32 "GLTest.cpp", 33 "IGraphicBufferProducer_test.cpp", 34 "Malicious.cpp", 35 "MultiTextureConsumer_test.cpp", 36 "RegionSampling_test.cpp", 37 "StreamSplitter_test.cpp", 38 "SurfaceTextureClient_test.cpp", 39 "SurfaceTextureFBO_test.cpp", 40 "SurfaceTextureGLThreadToGL_test.cpp", 41 "SurfaceTextureGLToGL_test.cpp", 42 "SurfaceTextureGL_test.cpp", 43 "SurfaceTextureMultiContextGL_test.cpp", 44 "Surface_test.cpp", 45 "TextureRenderer.cpp", 46 "WindowInfo_test.cpp", 47 ], 48 49 shared_libs: [ 50 "android.hardware.configstore@1.0", 51 "android.hardware.configstore-utils", 52 "libSurfaceFlingerProp", 53 "libbase", 54 "liblog", 55 "libEGL", 56 "libGLESv1_CM", 57 "libGLESv2", 58 "libbinder", 59 "libcutils", 60 "libgui", 61 "libhidlbase", 62 "libinput", 63 "libui", 64 "libutils", 65 "libnativewindow" 66 ], 67 68 header_libs: ["libsurfaceflinger_headers"], 69} 70 71// Build the tests that need to run with both 32bit and 64bit. 72cc_test { 73 name: "libgui_multilib_test", 74 test_suites: ["device-tests"], 75 76 clang: true, 77 cflags: [ 78 "-Wall", 79 "-Werror", 80 ], 81 82 srcs: [ 83 "DisplayEventStructLayout_test.cpp", 84 ], 85 86 shared_libs: [ 87 "libgui", 88 ], 89 90 compile_multilib: "both", 91 92 header_libs: ["libsurfaceflinger_headers"], 93} 94 95// Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) 96// This test has a main method, and requires a separate binary to be built. 97// To add move tests like this, just add additional cc_test statements, 98// as opposed to adding more source files to this one. 99cc_test { 100 name: "SurfaceParcelable_test", 101 test_suites: ["device-tests"], 102 103 clang: true, 104 cflags: [ 105 "-Wall", 106 "-Werror", 107 ], 108 109 srcs: [ 110 "SurfaceParcelable_test.cpp", 111 ], 112 113 shared_libs: [ 114 "liblog", 115 "libbinder", 116 "libcutils", 117 "libgui", 118 "libui", 119 "libutils", 120 "libbufferhubqueue", // TODO(b/70046255): Remove these once BufferHub is integrated into libgui. 121 "libpdx_default_transport", 122 ], 123 124 header_libs: [ 125 "libdvr_headers", 126 ], 127} 128 129cc_test { 130 name: "SamplingDemo", 131 132 clang: true, 133 cflags: [ 134 "-Wall", 135 "-Werror", 136 ], 137 138 srcs: [ 139 "SamplingDemo.cpp", 140 ], 141 142 shared_libs: [ 143 "libbinder", 144 "libcutils", 145 "libgui", 146 "liblog", 147 "libui", 148 "libutils", 149 ] 150} 151