blob: 6077b4e59f7849b2a3a18619269604d5ab210a5c [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 Badour3c538232021-02-12 21:26:48 -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
18 clang: true,
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070019 cflags: [
20 "-Wall",
21 "-Werror",
22 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070023
24 srcs: [
Valerie Hauc5011f92019-10-11 09:52:07 -070025 "BLASTBufferQueue_test.cpp",
26 "BufferItemConsumer_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070027 "BufferQueue_test.cpp",
28 "CpuConsumer_test.cpp",
Robert Carr1c4c5592018-09-24 13:18:43 -070029 "EndToEndNativeInputTest.cpp",
Kevin DuBois9c0a1762018-10-16 13:32:31 -070030 "DisplayedContentSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031 "FillBuffer.cpp",
32 "GLTest.cpp",
33 "IGraphicBufferProducer_test.cpp",
Dan Stoza47730d62017-05-16 15:12:48 -070034 "Malicious.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070035 "MultiTextureConsumer_test.cpp",
Kevin DuBois4df38a42019-02-14 12:59:43 -080036 "RegionSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070037 "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 ],
47
48 shared_libs: [
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060049 "android.hardware.configstore@1.0",
50 "android.hardware.configstore-utils",
Sundong Ahnf33c9f12020-04-23 21:31:20 +090051 "libSurfaceFlingerProp",
Yiwei Zhang5434a782018-12-05 18:06:32 -080052 "libbase",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070053 "liblog",
54 "libEGL",
55 "libGLESv1_CM",
56 "libGLESv2",
57 "libbinder",
58 "libcutils",
59 "libgui",
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060060 "libhidlbase",
Robert Carr3720ed02018-08-08 16:08:27 -070061 "libinput",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070062 "libui",
63 "libutils",
Mathias Agopian89ed4c82017-02-09 18:48:34 -080064 "libnativewindow"
Dan Willemsen3106c1c2016-10-03 23:56:51 -070065 ],
Sundong Ahnf33c9f12020-04-23 21:31:20 +090066
67 header_libs: ["libsurfaceflinger_headers"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070068}
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080069
Siarhei Vishniakou4f5daff2018-06-12 16:51:38 +010070// Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
71// This test has a main method, and requires a separate binary to be built.
72// To add move tests like this, just add additional cc_test statements,
73// as opposed to adding more source files to this one.
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080074cc_test {
Siarhei Vishniakou4f5daff2018-06-12 16:51:38 +010075 name: "SurfaceParcelable_test",
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080076 test_suites: ["device-tests"],
77
78 clang: true,
79 cflags: [
80 "-Wall",
81 "-Werror",
82 ],
83
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080084 srcs: [
85 "SurfaceParcelable_test.cpp",
86 ],
87
88 shared_libs: [
89 "liblog",
90 "libbinder",
91 "libcutils",
92 "libgui",
93 "libui",
94 "libutils",
95 "libbufferhubqueue", // TODO(b/70046255): Remove these once BufferHub is integrated into libgui.
96 "libpdx_default_transport",
97 ],
98
99 header_libs: [
100 "libdvr_headers",
101 ],
102}
Dan Stozaec460082018-12-17 15:35:09 -0800103
104cc_test {
105 name: "SamplingDemo",
106
107 clang: true,
108 cflags: [
109 "-Wall",
110 "-Werror",
111 ],
112
113 srcs: [
114 "SamplingDemo.cpp",
115 ],
116
117 shared_libs: [
118 "libbinder",
119 "libcutils",
120 "libgui",
121 "liblog",
122 "libui",
123 "libutils",
124 ]
125}