blob: 1b216e906344556b2d12b3f95a42c6dc6dffd3a7 [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 {
Aditya Choudhary3819e602024-02-05 15:41:13 +00006 default_team: "trendy_team_android_core_graphics_stack",
Bob Badour3306e492021-02-25 15:35:37 -08007 // See: http://go/android-license-faq
8 // A large-scale-change added 'default_applicable_licenses' to import
9 // all of the 'license_kinds' from "frameworks_native_license"
10 // to get the below license kinds:
11 // SPDX-license-identifier-Apache-2.0
12 default_applicable_licenses: ["frameworks_native_license"],
13}
14
Dan Willemsen3106c1c2016-10-03 23:56:51 -070015cc_test {
16 name: "libgui_test",
Dan Shi9cd52062017-03-29 23:09:37 -070017 test_suites: ["device-tests"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070018
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070019 defaults: ["libgui-defaults"],
20
21 cppflags: [
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070022 "-Wall",
23 "-Werror",
Siarhei Vishniakoubf98a572024-03-29 13:34:42 -070024 "-Wextra",
25 "-Wthread-safety",
Ady Abraham107788e2023-10-17 12:31:08 -070026 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true",
John Reckdb164ff2024-04-03 16:59:28 -040027 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_EXTENDEDALLOCATE=true",
Jim Shargod30823a2024-07-27 02:49:39 +000028 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_CONSUMER_BASE_OWNS_BQ=true",
Jim Shargo00886392024-07-12 22:12:20 +000029 "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_WB_PLATFORM_API_IMPROVEMENTS=true",
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070030 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031
32 srcs: [
Nolan Scobiecfa41bf2023-06-14 15:13:18 -040033 "LibGuiMain.cpp", // Custom gtest entrypoint
Valerie Hauc5011f92019-10-11 09:52:07 -070034 "BLASTBufferQueue_test.cpp",
Yahan Zhou3cbda592020-08-03 15:53:27 -070035 "BufferItemConsumer_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070036 "BufferQueue_test.cpp",
Patrick Williamsf693bcf2024-08-02 09:55:23 -050037 "BufferReleaseChannel_test.cpp",
Chavi Weingarten475c4132024-02-29 15:56:15 +000038 "Choreographer_test.cpp",
Dominik Laskowski5a5e01e2022-07-08 07:52:44 -070039 "CompositorTiming_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070040 "CpuConsumer_test.cpp",
Robert Carr1c4c5592018-09-24 13:18:43 -070041 "EndToEndNativeInputTest.cpp",
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070042 "FrameRateUtilsTest.cpp",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -070043 "DisplayInfo_test.cpp",
Kevin DuBois9c0a1762018-10-16 13:32:31 -070044 "DisplayedContentSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070045 "FillBuffer.cpp",
46 "GLTest.cpp",
47 "IGraphicBufferProducer_test.cpp",
Dan Stoza47730d62017-05-16 15:12:48 -070048 "Malicious.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070049 "MultiTextureConsumer_test.cpp",
Kevin DuBois4df38a42019-02-14 12:59:43 -080050 "RegionSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070051 "StreamSplitter_test.cpp",
52 "SurfaceTextureClient_test.cpp",
53 "SurfaceTextureFBO_test.cpp",
54 "SurfaceTextureGLThreadToGL_test.cpp",
55 "SurfaceTextureGLToGL_test.cpp",
56 "SurfaceTextureGL_test.cpp",
57 "SurfaceTextureMultiContextGL_test.cpp",
58 "Surface_test.cpp",
59 "TextureRenderer.cpp",
Rachel Lee18c34372022-01-20 13:57:18 -080060 "VsyncEventData_test.cpp",
chaviw98318de2021-05-19 16:45:23 -050061 "WindowInfo_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070062 ],
63
64 shared_libs: [
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060065 "android.hardware.configstore@1.0",
66 "android.hardware.configstore-utils",
Sundong Ahne6e7d442020-04-23 21:31:20 +090067 "libSurfaceFlingerProp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070068 "libGLESv1_CM",
Robert Carr3720ed02018-08-08 16:08:27 -070069 "libinput",
Chavi Weingarten475c4132024-02-29 15:56:15 +000070 "libnativedisplay",
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070071 ],
72
73 static_libs: [
74 "libgmock",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070075 ],
Sundong Ahne6e7d442020-04-23 21:31:20 +090076
77 header_libs: ["libsurfaceflinger_headers"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070078}
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080079
Yahan Zhou3cbda592020-08-03 15:53:27 -070080// Build the tests that need to run with both 32bit and 64bit.
81cc_test {
82 name: "libgui_multilib_test",
83 test_suites: ["device-tests"],
84
Yahan Zhou3cbda592020-08-03 15:53:27 -070085 cflags: [
86 "-Wall",
87 "-Werror",
88 ],
89
90 srcs: [
91 "DisplayEventStructLayout_test.cpp",
92 ],
93
94 shared_libs: [
95 "libgui",
96 ],
97
98 compile_multilib: "both",
99
100 header_libs: ["libsurfaceflinger_headers"],
jahinimtiaz63138ec2023-03-14 00:07:50 +0000101 data: [
102 ":libgui_test",
103 ],
Yahan Zhou3cbda592020-08-03 15:53:27 -0700104}
105
Dan Stozaec460082018-12-17 15:35:09 -0800106cc_test {
107 name: "SamplingDemo",
108
Dan Stozaec460082018-12-17 15:35:09 -0800109 cflags: [
110 "-Wall",
111 "-Werror",
112 ],
113
114 srcs: [
115 "SamplingDemo.cpp",
116 ],
117
118 shared_libs: [
119 "libbinder",
120 "libcutils",
121 "libgui",
122 "liblog",
123 "libui",
124 "libutils",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -0700125 ],
Dan Stozaec460082018-12-17 15:35:09 -0800126}