blob: 53c13c8859135f12bbb375143ab2ba7e91fa61cc [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.
5cc_test {
6 name: "libgui_test",
Dan Shi9cd52062017-03-29 23:09:37 -07007 test_suites: ["device-tests"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -07008
9 clang: true,
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070010 cflags: [
11 "-Wall",
12 "-Werror",
13 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070014
15 srcs: [
Valerie Hauc5011f92019-10-11 09:52:07 -070016 "BLASTBufferQueue_test.cpp",
Yahan Zhou3cbda592020-08-03 15:53:27 -070017 "BufferItemConsumer_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070018 "BufferQueue_test.cpp",
19 "CpuConsumer_test.cpp",
Robert Carr1c4c5592018-09-24 13:18:43 -070020 "EndToEndNativeInputTest.cpp",
Kevin DuBois9c0a1762018-10-16 13:32:31 -070021 "DisplayedContentSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070022 "FillBuffer.cpp",
23 "GLTest.cpp",
24 "IGraphicBufferProducer_test.cpp",
Dan Stoza47730d62017-05-16 15:12:48 -070025 "Malicious.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070026 "MultiTextureConsumer_test.cpp",
Kevin DuBois4df38a42019-02-14 12:59:43 -080027 "RegionSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070028 "StreamSplitter_test.cpp",
29 "SurfaceTextureClient_test.cpp",
30 "SurfaceTextureFBO_test.cpp",
31 "SurfaceTextureGLThreadToGL_test.cpp",
32 "SurfaceTextureGLToGL_test.cpp",
33 "SurfaceTextureGL_test.cpp",
34 "SurfaceTextureMultiContextGL_test.cpp",
35 "Surface_test.cpp",
36 "TextureRenderer.cpp",
37 ],
38
39 shared_libs: [
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060040 "android.hardware.configstore@1.0",
41 "android.hardware.configstore-utils",
Sundong Ahne6e7d442020-04-23 21:31:20 +090042 "libSurfaceFlingerProp",
Yiwei Zhang5434a782018-12-05 18:06:32 -080043 "libbase",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070044 "liblog",
45 "libEGL",
46 "libGLESv1_CM",
47 "libGLESv2",
48 "libbinder",
49 "libcutils",
50 "libgui",
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060051 "libhidlbase",
Robert Carr3720ed02018-08-08 16:08:27 -070052 "libinput",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070053 "libui",
54 "libutils",
Mathias Agopian89ed4c82017-02-09 18:48:34 -080055 "libnativewindow"
Dan Willemsen3106c1c2016-10-03 23:56:51 -070056 ],
Sundong Ahne6e7d442020-04-23 21:31:20 +090057
58 header_libs: ["libsurfaceflinger_headers"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070059}
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080060
Yahan Zhou3cbda592020-08-03 15:53:27 -070061// Build the tests that need to run with both 32bit and 64bit.
62cc_test {
63 name: "libgui_multilib_test",
64 test_suites: ["device-tests"],
65
66 clang: true,
67 cflags: [
68 "-Wall",
69 "-Werror",
70 ],
71
72 srcs: [
73 "DisplayEventStructLayout_test.cpp",
74 ],
75
76 shared_libs: [
77 "libgui",
78 ],
79
80 compile_multilib: "both",
81
82 header_libs: ["libsurfaceflinger_headers"],
83}
84
Siarhei Vishniakou4f5daff2018-06-12 16:51:38 +010085// Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
86// This test has a main method, and requires a separate binary to be built.
87// To add move tests like this, just add additional cc_test statements,
88// as opposed to adding more source files to this one.
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080089cc_test {
Siarhei Vishniakou4f5daff2018-06-12 16:51:38 +010090 name: "SurfaceParcelable_test",
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080091 test_suites: ["device-tests"],
92
93 clang: true,
94 cflags: [
95 "-Wall",
96 "-Werror",
97 ],
98
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080099 srcs: [
100 "SurfaceParcelable_test.cpp",
101 ],
102
103 shared_libs: [
104 "liblog",
105 "libbinder",
106 "libcutils",
107 "libgui",
108 "libui",
109 "libutils",
110 "libbufferhubqueue", // TODO(b/70046255): Remove these once BufferHub is integrated into libgui.
111 "libpdx_default_transport",
112 ],
113
114 header_libs: [
115 "libdvr_headers",
116 ],
117}
Dan Stozaec460082018-12-17 15:35:09 -0800118
119cc_test {
120 name: "SamplingDemo",
121
122 clang: true,
123 cflags: [
124 "-Wall",
125 "-Werror",
126 ],
127
128 srcs: [
129 "SamplingDemo.cpp",
130 ],
131
132 shared_libs: [
133 "libbinder",
134 "libcutils",
135 "libgui",
136 "liblog",
137 "libui",
138 "libutils",
139 ]
140}