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. |
| 5 | cc_test { |
| 6 | name: "libgui_test", |
Dan Shi | 9cd5206 | 2017-03-29 23:09:37 -0700 | [diff] [blame] | 7 | test_suites: ["device-tests"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 8 | |
| 9 | clang: true, |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 10 | cflags: [ |
| 11 | "-Wall", |
| 12 | "-Werror", |
| 13 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 14 | |
| 15 | srcs: [ |
Valerie Hau | c5011f9 | 2019-10-11 09:52:07 -0700 | [diff] [blame] | 16 | "BLASTBufferQueue_test.cpp", |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame^] | 17 | "BufferItemConsumer_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 18 | "BufferQueue_test.cpp", |
| 19 | "CpuConsumer_test.cpp", |
Robert Carr | 1c4c559 | 2018-09-24 13:18:43 -0700 | [diff] [blame] | 20 | "EndToEndNativeInputTest.cpp", |
Kevin DuBois | 9c0a176 | 2018-10-16 13:32:31 -0700 | [diff] [blame] | 21 | "DisplayedContentSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 22 | "FillBuffer.cpp", |
| 23 | "GLTest.cpp", |
| 24 | "IGraphicBufferProducer_test.cpp", |
Dan Stoza | 47730d6 | 2017-05-16 15:12:48 -0700 | [diff] [blame] | 25 | "Malicious.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 26 | "MultiTextureConsumer_test.cpp", |
Kevin DuBois | 4df38a4 | 2019-02-14 12:59:43 -0800 | [diff] [blame] | 27 | "RegionSampling_test.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 28 | "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 Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 40 | "android.hardware.configstore@1.0", |
| 41 | "android.hardware.configstore-utils", |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 42 | "libSurfaceFlingerProp", |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 43 | "libbase", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 44 | "liblog", |
| 45 | "libEGL", |
| 46 | "libGLESv1_CM", |
| 47 | "libGLESv2", |
| 48 | "libbinder", |
| 49 | "libcutils", |
| 50 | "libgui", |
Courtney Goeltzenleuchter | 6a570b6 | 2017-03-13 14:30:00 -0600 | [diff] [blame] | 51 | "libhidlbase", |
Robert Carr | 3720ed0 | 2018-08-08 16:08:27 -0700 | [diff] [blame] | 52 | "libinput", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 53 | "libui", |
| 54 | "libutils", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 55 | "libnativewindow" |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 56 | ], |
Sundong Ahn | e6e7d44 | 2020-04-23 21:31:20 +0900 | [diff] [blame] | 57 | |
| 58 | header_libs: ["libsurfaceflinger_headers"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 59 | } |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 60 | |
Yahan Zhou | 3cbda59 | 2020-08-03 15:53:27 -0700 | [diff] [blame^] | 61 | // Build the tests that need to run with both 32bit and 64bit. |
| 62 | cc_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 Vishniakou | 4f5daff | 2018-06-12 16:51:38 +0100 | [diff] [blame] | 85 | // 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' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 89 | cc_test { |
Siarhei Vishniakou | 4f5daff | 2018-06-12 16:51:38 +0100 | [diff] [blame] | 90 | name: "SurfaceParcelable_test", |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 91 | test_suites: ["device-tests"], |
| 92 | |
| 93 | clang: true, |
| 94 | cflags: [ |
| 95 | "-Wall", |
| 96 | "-Werror", |
| 97 | ], |
| 98 | |
Jiwen 'Steve' Cai | c90a77f | 2018-01-14 15:42:29 -0800 | [diff] [blame] | 99 | 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 Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 118 | |
| 119 | cc_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 | } |