Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 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. |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 5 | package { |
| 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 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 14 | cc_test { |
| 15 | name: "libgui_test", |
Dan Shi | 9cd5206 | 2017-03-29 23:09:37 -0700 | [diff] [blame] | 16 | test_suites: ["device-tests"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 17 | |
| 18 | clang: true, |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 19 | cflags: [ |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 23 | |
| 24 | srcs: [ |
Valerie Hau | c5011f9 | 2019-10-11 09:52:07 -0700 | [diff] [blame] | 25 | "BLASTBufferQueue_test.cpp", |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 26 | "BufferItemConsumer_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 27 | "BufferQueue_test.cpp", |
| 28 | "CpuConsumer_test.cpp", |
Robert Carr | 1c4c559 | 2018-09-24 13:18:43 -0700 | [diff] [blame] | 29 | "EndToEndNativeInputTest.cpp", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame^] | 30 | "DisplayInfo_test.cpp", |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame] | 31 | "DisplayedContentSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 32 | "FillBuffer.cpp", |
| 33 | "GLTest.cpp", |
| 34 | "IGraphicBufferProducer_test.cpp", |
Dan Stoza | 47730d6 | 2017-05-16 15:12:48 -0700 | [diff] [blame] | 35 | "Malicious.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 36 | "MultiTextureConsumer_test.cpp", |
Kevin DuBois | 4df38a4 | 2019-02-14 12:59:43 -0800 | [diff] [blame] | 37 | "RegionSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 38 | "StreamSplitter_test.cpp", |
| 39 | "SurfaceTextureClient_test.cpp", |
| 40 | "SurfaceTextureFBO_test.cpp", |
| 41 | "SurfaceTextureGLThreadToGL_test.cpp", |
| 42 | "SurfaceTextureGLToGL_test.cpp", |
| 43 | "SurfaceTextureGL_test.cpp", |
| 44 | "SurfaceTextureMultiContextGL_test.cpp", |
| 45 | "Surface_test.cpp", |
| 46 | "TextureRenderer.cpp", |
chaviw | 98318de | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 47 | "WindowInfo_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 48 | ], |
| 49 | |
| 50 | shared_libs: [ |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 51 | "android.hardware.configstore@1.0", |
| 52 | "android.hardware.configstore-utils", |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 53 | "libSurfaceFlingerProp", |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 54 | "libbase", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 55 | "liblog", |
| 56 | "libEGL", |
| 57 | "libGLESv1_CM", |
| 58 | "libGLESv2", |
| 59 | "libbinder", |
| 60 | "libcutils", |
| 61 | "libgui", |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 62 | "libhidlbase", |
Robert Carr | 3720ed0 | 2018-08-08 16:08:27 -0700 | [diff] [blame] | 63 | "libinput", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 64 | "libui", |
| 65 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame^] | 66 | "libnativewindow", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 67 | ], |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 68 | |
| 69 | header_libs: ["libsurfaceflinger_headers"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 70 | } |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 71 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 72 | // Build the tests that need to run with both 32bit and 64bit. |
| 73 | cc_test { |
| 74 | name: "libgui_multilib_test", |
| 75 | test_suites: ["device-tests"], |
| 76 | |
| 77 | clang: true, |
| 78 | cflags: [ |
| 79 | "-Wall", |
| 80 | "-Werror", |
| 81 | ], |
| 82 | |
| 83 | srcs: [ |
| 84 | "DisplayEventStructLayout_test.cpp", |
| 85 | ], |
| 86 | |
| 87 | shared_libs: [ |
| 88 | "libgui", |
| 89 | ], |
| 90 | |
| 91 | compile_multilib: "both", |
| 92 | |
| 93 | header_libs: ["libsurfaceflinger_headers"], |
| 94 | } |
| 95 | |
Siarhei Vishniakou | 4f5daff | 2018-06-12 16:51:38 +0100 | [diff] [blame] | 96 | // Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) |
| 97 | // This test has a main method, and requires a separate binary to be built. |
| 98 | // To add move tests like this, just add additional cc_test statements, |
| 99 | // as opposed to adding more source files to this one. |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 100 | cc_test { |
Siarhei Vishniakou | 4f5daff | 2018-06-12 16:51:38 +0100 | [diff] [blame] | 101 | name: "SurfaceParcelable_test", |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 102 | test_suites: ["device-tests"], |
| 103 | |
| 104 | clang: true, |
| 105 | cflags: [ |
| 106 | "-Wall", |
| 107 | "-Werror", |
| 108 | ], |
| 109 | |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 110 | srcs: [ |
| 111 | "SurfaceParcelable_test.cpp", |
| 112 | ], |
| 113 | |
| 114 | shared_libs: [ |
| 115 | "liblog", |
| 116 | "libbinder", |
| 117 | "libcutils", |
| 118 | "libgui", |
| 119 | "libui", |
| 120 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame^] | 121 | "libbufferhubqueue", // TODO(b/70046255): Remove these once BufferHub is integrated into libgui. |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 122 | "libpdx_default_transport", |
| 123 | ], |
| 124 | |
| 125 | header_libs: [ |
| 126 | "libdvr_headers", |
| 127 | ], |
| 128 | } |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 129 | |
| 130 | cc_test { |
| 131 | name: "SamplingDemo", |
| 132 | |
| 133 | clang: true, |
| 134 | cflags: [ |
| 135 | "-Wall", |
| 136 | "-Werror", |
| 137 | ], |
| 138 | |
| 139 | srcs: [ |
| 140 | "SamplingDemo.cpp", |
| 141 | ], |
| 142 | |
| 143 | shared_libs: [ |
| 144 | "libbinder", |
| 145 | "libcutils", |
| 146 | "libgui", |
| 147 | "liblog", |
| 148 | "libui", |
| 149 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame^] | 150 | ], |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 151 | } |