blob: 38c0eed474bcadca60d093d5387d7b866d6c12bf [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
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070018 defaults: ["libgui-defaults"],
19
20 cppflags: [
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070021 "-Wall",
22 "-Werror",
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070023 "-Wno-extra",
24 "-DFLAG_BQ_SET_FRAME_RATE=true",
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070025 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070026
27 srcs: [
Nolan Scobiecfa41bf2023-06-14 15:13:18 -040028 "LibGuiMain.cpp", // Custom gtest entrypoint
Valerie Hauc5011f92019-10-11 09:52:07 -070029 "BLASTBufferQueue_test.cpp",
Yahan Zhou3cbda592020-08-03 15:53:27 -070030 "BufferItemConsumer_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031 "BufferQueue_test.cpp",
Dominik Laskowski5a5e01e2022-07-08 07:52:44 -070032 "CompositorTiming_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070033 "CpuConsumer_test.cpp",
Robert Carr1c4c5592018-09-24 13:18:43 -070034 "EndToEndNativeInputTest.cpp",
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070035 "FrameRateUtilsTest.cpp",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -070036 "DisplayInfo_test.cpp",
Kevin DuBois9c0a1762018-10-16 13:32:31 -070037 "DisplayedContentSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070038 "FillBuffer.cpp",
39 "GLTest.cpp",
40 "IGraphicBufferProducer_test.cpp",
Dan Stoza47730d62017-05-16 15:12:48 -070041 "Malicious.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070042 "MultiTextureConsumer_test.cpp",
Kevin DuBois4df38a42019-02-14 12:59:43 -080043 "RegionSampling_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070044 "StreamSplitter_test.cpp",
45 "SurfaceTextureClient_test.cpp",
46 "SurfaceTextureFBO_test.cpp",
47 "SurfaceTextureGLThreadToGL_test.cpp",
48 "SurfaceTextureGLToGL_test.cpp",
49 "SurfaceTextureGL_test.cpp",
50 "SurfaceTextureMultiContextGL_test.cpp",
51 "Surface_test.cpp",
52 "TextureRenderer.cpp",
Rachel Lee18c34372022-01-20 13:57:18 -080053 "VsyncEventData_test.cpp",
chaviw98318de2021-05-19 16:45:23 -050054 "WindowInfo_test.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070055 ],
56
57 shared_libs: [
Courtney Goeltzenleuchter6a570b62017-03-13 14:30:00 -060058 "android.hardware.configstore@1.0",
59 "android.hardware.configstore-utils",
Sundong Ahne6e7d442020-04-23 21:31:20 +090060 "libSurfaceFlingerProp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070061 "libGLESv1_CM",
Robert Carr3720ed02018-08-08 16:08:27 -070062 "libinput",
Ady Abraham6cdd3fd2023-09-07 18:45:58 -070063 ],
64
65 static_libs: [
66 "libgmock",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070067 ],
Sundong Ahne6e7d442020-04-23 21:31:20 +090068
69 header_libs: ["libsurfaceflinger_headers"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070070}
Jiwen 'Steve' Caic90a77f2018-01-14 15:42:29 -080071
Yahan Zhou3cbda592020-08-03 15:53:27 -070072// Build the tests that need to run with both 32bit and 64bit.
73cc_test {
74 name: "libgui_multilib_test",
75 test_suites: ["device-tests"],
76
Yahan Zhou3cbda592020-08-03 15:53:27 -070077 cflags: [
78 "-Wall",
79 "-Werror",
80 ],
81
82 srcs: [
83 "DisplayEventStructLayout_test.cpp",
84 ],
85
86 shared_libs: [
87 "libgui",
88 ],
89
90 compile_multilib: "both",
91
92 header_libs: ["libsurfaceflinger_headers"],
jahinimtiaz63138ec2023-03-14 00:07:50 +000093 data: [
94 ":libgui_test",
95 ],
Yahan Zhou3cbda592020-08-03 15:53:27 -070096}
97
Dan Stozaec460082018-12-17 15:35:09 -080098cc_test {
99 name: "SamplingDemo",
100
Dan Stozaec460082018-12-17 15:35:09 -0800101 cflags: [
102 "-Wall",
103 "-Werror",
104 ],
105
106 srcs: [
107 "SamplingDemo.cpp",
108 ],
109
110 shared_libs: [
111 "libbinder",
112 "libcutils",
113 "libgui",
114 "liblog",
115 "libui",
116 "libutils",
Prabir Pradhan48f8cb92021-08-26 14:05:36 -0700117 ],
Dan Stozaec460082018-12-17 15:35:09 -0800118}