blob: 7b37b25a61714ee5a9123d289283c6f04fd1abdd [file] [log] [blame]
Dan Willemsen3106c1c2016-10-03 23:56:51 -07001// 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 Badour3306e492021-02-25 15:35:37 -08005package {
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 Willemsen3106c1c2016-10-03 23:56:51 -070014cc_test {
15 name: "libgui_test",
Dan Shi9cd52062017-03-29 23:09:37 -070016 test_suites: ["device-tests"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070017
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070018 cflags: [
19 "-Wall",
20 "-Werror",
21 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070022
23 srcs: [
Valerie Hauc5011f92019-10-11 09:52:07 -070024 "BLASTBufferQueue_test.cpp",
Yahan Zhou3cbda592020-08-03 15:53:27 -070025 "BufferItemConsumer_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070026 "BufferQueue_test.cpp",
Dominik Laskowski5a5e01e2022-07-08 07:52:44 -070027 "CompositorTiming_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070028 "CpuConsumer_test.cpp",
Robert Carr1c4c5592018-09-24 13:18:43 -070029 "EndToEndNativeInputTest.cpp",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -070030 "DisplayInfo_test.cpp",
Kevin DuBois9c0a1762018-10-16 13:32:31 -070031 "DisplayedContentSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070032 "FillBuffer.cpp",
33 "GLTest.cpp",
34 "IGraphicBufferProducer_test.cpp",
Dan Stoza47730d62017-05-16 15:12:48 -070035 "Malicious.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070036 "MultiTextureConsumer_test.cpp",
Kevin DuBois4df38a42019-02-14 12:59:43 -080037 "RegionSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070038 "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 Lee18c34372022-01-20 13:57:18 -080047 "VsyncEventData_test.cpp",
chaviw98318de2021-05-19 16:45:23 -050048 "WindowInfo_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070049 ],
50
51 shared_libs: [
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060052 "android.hardware.configstore@1.0",
53 "android.hardware.configstore-utils",
Sundong Ahne6e7d442020-04-23 21:31:20 +090054 "libSurfaceFlingerProp",
Yiwei Zhang5434a782018-12-05 18:06:32 -080055 "libbase",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070056 "liblog",
57 "libEGL",
58 "libGLESv1_CM",
59 "libGLESv2",
60 "libbinder",
61 "libcutils",
62 "libgui",
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060063 "libhidlbase",
Robert Carr3720ed02018-08-08 16:08:27 -070064 "libinput",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070065 "libui",
66 "libutils",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -070067 "libnativewindow",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070068 ],
Sundong Ahne6e7d442020-04-23 21:31:20 +090069
70 header_libs: ["libsurfaceflinger_headers"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070071}
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080072
Yahan Zhou3cbda592020-08-03 15:53:27 -070073// Build the tests that need to run with both 32bit and 64bit.
74cc_test {
75 name: "libgui_multilib_test",
76 test_suites: ["device-tests"],
77
Yahan Zhou3cbda592020-08-03 15:53:27 -070078 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 Vishniakou4f5daff2018-06-12 16:51:38 +010096// 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' Caic90a77f2018-01-14 15:42:29 -0800100cc_test {
Siarhei Vishniakou4f5daff2018-06-12 16:51:38 +0100101 name: "SurfaceParcelable_test",
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -0800102 test_suites: ["device-tests"],
103
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -0800104 cflags: [
105 "-Wall",
106 "-Werror",
107 ],
108
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -0800109 srcs: [
110 "SurfaceParcelable_test.cpp",
111 ],
112
113 shared_libs: [
114 "liblog",
115 "libbinder",
116 "libcutils",
117 "libgui",
118 "libui",
119 "libutils",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -0700120 "libbufferhubqueue", // TODO(b/70046255): Remove these once BufferHub is integrated into libgui.
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -0800121 "libpdx_default_transport",
122 ],
123
124 header_libs: [
125 "libdvr_headers",
126 ],
127}
Dan Stozaec460082018-12-17 15:35:09 -0800128
129cc_test {
130 name: "SamplingDemo",
131
Dan Stozaec460082018-12-17 15:35:09 -0800132 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 Pradhan48f8cb92021-08-26 14:05:36 -0700148 ],
Dan Stozaec460082018-12-17 15:35:09 -0800149}