Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 1 | // 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 Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 5 | package { |
Aditya Choudhary | 3819e60 | 2024-02-05 15:41:13 +0000 | [diff] [blame] | 6 | default_team: "trendy_team_android_core_graphics_stack", |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 7 | // 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 Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 15 | cc_test { |
| 16 | name: "libgui_test", |
Dan Shi | 9cd5206 | 2017-03-29 23:09:37 -0700 | [diff] [blame] | 17 | test_suites: ["device-tests"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 18 | |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 19 | defaults: ["libgui-defaults"], |
| 20 | |
| 21 | cppflags: [ |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 22 | "-Wall", |
| 23 | "-Werror", |
Siarhei Vishniakou | bf98a57 | 2024-03-29 13:34:42 -0700 | [diff] [blame] | 24 | "-Wextra", |
| 25 | "-Wthread-safety", |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 26 | "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_SETFRAMERATE=true", |
John Reck | db164ff | 2024-04-03 16:59:28 -0400 | [diff] [blame] | 27 | "-DCOM_ANDROID_GRAPHICS_LIBGUI_FLAGS_BQ_EXTENDEDALLOCATE=true", |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 28 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 29 | |
| 30 | srcs: [ |
Nolan Scobie | cfa41bf | 2023-06-14 15:13:18 -0400 | [diff] [blame] | 31 | "LibGuiMain.cpp", // Custom gtest entrypoint |
Valerie Hau | c5011f9 | 2019-10-11 09:52:07 -0700 | [diff] [blame] | 32 | "BLASTBufferQueue_test.cpp", |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 33 | "BufferItemConsumer_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 34 | "BufferQueue_test.cpp", |
Chavi Weingarten | 475c413 | 2024-02-29 15:56:15 +0000 | [diff] [blame] | 35 | "Choreographer_test.cpp", |
Dominik Laskowski | 5a5e01e | 2022-07-08 07:52:44 -0700 | [diff] [blame] | 36 | "CompositorTiming_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 37 | "CpuConsumer_test.cpp", |
Robert Carr | 1c4c559 | 2018-09-24 13:18:43 -0700 | [diff] [blame] | 38 | "EndToEndNativeInputTest.cpp", |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 39 | "FrameRateUtilsTest.cpp", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 40 | "DisplayInfo_test.cpp", |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame] | 41 | "DisplayedContentSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 42 | "FillBuffer.cpp", |
| 43 | "GLTest.cpp", |
| 44 | "IGraphicBufferProducer_test.cpp", |
Dan Stoza | 47730d6 | 2017-05-16 15:12:48 -0700 | [diff] [blame] | 45 | "Malicious.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 46 | "MultiTextureConsumer_test.cpp", |
Kevin DuBois | 4df38a4 | 2019-02-14 12:59:43 -0800 | [diff] [blame] | 47 | "RegionSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 48 | "StreamSplitter_test.cpp", |
| 49 | "SurfaceTextureClient_test.cpp", |
| 50 | "SurfaceTextureFBO_test.cpp", |
| 51 | "SurfaceTextureGLThreadToGL_test.cpp", |
| 52 | "SurfaceTextureGLToGL_test.cpp", |
| 53 | "SurfaceTextureGL_test.cpp", |
| 54 | "SurfaceTextureMultiContextGL_test.cpp", |
| 55 | "Surface_test.cpp", |
| 56 | "TextureRenderer.cpp", |
Rachel Lee | 18c3437 | 2022-01-20 13:57:18 -0800 | [diff] [blame] | 57 | "VsyncEventData_test.cpp", |
chaviw | 98318de | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 58 | "WindowInfo_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 59 | ], |
| 60 | |
| 61 | shared_libs: [ |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 62 | "android.hardware.configstore@1.0", |
| 63 | "android.hardware.configstore-utils", |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 64 | "libSurfaceFlingerProp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 65 | "libGLESv1_CM", |
Robert Carr | 3720ed0 | 2018-08-08 16:08:27 -0700 | [diff] [blame] | 66 | "libinput", |
Chavi Weingarten | 475c413 | 2024-02-29 15:56:15 +0000 | [diff] [blame] | 67 | "libnativedisplay", |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 68 | ], |
| 69 | |
| 70 | static_libs: [ |
| 71 | "libgmock", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 72 | ], |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 73 | |
| 74 | header_libs: ["libsurfaceflinger_headers"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 75 | } |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 76 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 77 | // Build the tests that need to run with both 32bit and 64bit. |
| 78 | cc_test { |
| 79 | name: "libgui_multilib_test", |
| 80 | test_suites: ["device-tests"], |
| 81 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 82 | cflags: [ |
| 83 | "-Wall", |
| 84 | "-Werror", |
| 85 | ], |
| 86 | |
| 87 | srcs: [ |
| 88 | "DisplayEventStructLayout_test.cpp", |
| 89 | ], |
| 90 | |
| 91 | shared_libs: [ |
| 92 | "libgui", |
| 93 | ], |
| 94 | |
| 95 | compile_multilib: "both", |
| 96 | |
| 97 | header_libs: ["libsurfaceflinger_headers"], |
jahinimtiaz | 63138ec | 2023-03-14 00:07:50 +0000 | [diff] [blame] | 98 | data: [ |
| 99 | ":libgui_test", |
| 100 | ], |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame] | 101 | } |
| 102 | |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 103 | cc_test { |
| 104 | name: "SamplingDemo", |
| 105 | |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 106 | cflags: [ |
| 107 | "-Wall", |
| 108 | "-Werror", |
| 109 | ], |
| 110 | |
| 111 | srcs: [ |
| 112 | "SamplingDemo.cpp", |
| 113 | ], |
| 114 | |
| 115 | shared_libs: [ |
| 116 | "libbinder", |
| 117 | "libcutils", |
| 118 | "libgui", |
| 119 | "liblog", |
| 120 | "libui", |
| 121 | "libutils", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 122 | ], |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 123 | } |