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 | |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 18 | cflags: [ |
| 19 | "-Wall", |
| 20 | "-Werror", |
| 21 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 22 | |
| 23 | srcs: [ |
Valerie Hau | c5011f9 | 2019-10-11 09:52:07 -0700 | [diff] [blame] | 24 | "BLASTBufferQueue_test.cpp", |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 25 | "BufferItemConsumer_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 26 | "BufferQueue_test.cpp", |
Dominik Laskowski | 5a5e01e | 2022-07-08 07:52:44 -0700 | [diff] [blame^] | 27 | "CompositorTiming_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 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", |
Rachel Lee | 18c3437 | 2022-01-20 13:57:18 -0800 | [diff] [blame] | 47 | "VsyncEventData_test.cpp", |
chaviw | 98318de | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 48 | "WindowInfo_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 49 | ], |
| 50 | |
| 51 | shared_libs: [ |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 52 | "android.hardware.configstore@1.0", |
| 53 | "android.hardware.configstore-utils", |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 54 | "libSurfaceFlingerProp", |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 55 | "libbase", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 56 | "liblog", |
| 57 | "libEGL", |
| 58 | "libGLESv1_CM", |
| 59 | "libGLESv2", |
| 60 | "libbinder", |
| 61 | "libcutils", |
| 62 | "libgui", |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 63 | "libhidlbase", |
Robert Carr | 3720ed0 | 2018-08-08 16:08:27 -0700 | [diff] [blame] | 64 | "libinput", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 65 | "libui", |
| 66 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 67 | "libnativewindow", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 68 | ], |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 69 | |
| 70 | header_libs: ["libsurfaceflinger_headers"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 71 | } |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 72 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 73 | // Build the tests that need to run with both 32bit and 64bit. |
| 74 | cc_test { |
| 75 | name: "libgui_multilib_test", |
| 76 | test_suites: ["device-tests"], |
| 77 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 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 | |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 104 | cflags: [ |
| 105 | "-Wall", |
| 106 | "-Werror", |
| 107 | ], |
| 108 | |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 109 | srcs: [ |
| 110 | "SurfaceParcelable_test.cpp", |
| 111 | ], |
| 112 | |
| 113 | shared_libs: [ |
| 114 | "liblog", |
| 115 | "libbinder", |
| 116 | "libcutils", |
| 117 | "libgui", |
| 118 | "libui", |
| 119 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 120 | "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] | 121 | "libpdx_default_transport", |
| 122 | ], |
| 123 | |
| 124 | header_libs: [ |
| 125 | "libdvr_headers", |
| 126 | ], |
| 127 | } |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 128 | |
| 129 | cc_test { |
| 130 | name: "SamplingDemo", |
| 131 | |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 132 | cflags: [ |
| 133 | "-Wall", |
| 134 | "-Werror", |
| 135 | ], |
| 136 | |
| 137 | srcs: [ |
| 138 | "SamplingDemo.cpp", |
| 139 | ], |
| 140 | |
| 141 | shared_libs: [ |
| 142 | "libbinder", |
| 143 | "libcutils", |
| 144 | "libgui", |
| 145 | "liblog", |
| 146 | "libui", |
| 147 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 148 | ], |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 149 | } |