blob: 6aae25d6d7a361b83f0b3e38db799b08aeea2e27 [file] [log] [blame]
Dan Willemsenc7dd2b92016-08-25 17:05:22 -07001// Build the unit tests.
Bob Badour3306e492021-02-25 15:35:37 -08002package {
3 // See: http://go/android-license-faq
4 // A large-scale-change added 'default_applicable_licenses' to import
5 // all of the 'license_kinds' from "frameworks_native_license"
6 // to get the below license kinds:
7 // SPDX-license-identifier-Apache-2.0
8 default_applicable_licenses: ["frameworks_native_license"],
9}
10
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070011cc_test {
12 name: "libinput_tests",
Philip Quinn8f953ab2022-12-06 15:37:07 -080013 cpp_std: "c++20",
Siarhei Vishniakou5e83dfe2022-09-28 17:04:42 -070014 host_supported: true,
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070015 srcs: [
Garfield Tan84b087e2020-01-23 10:49:05 -080016 "IdGenerator_test.cpp",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070017 "InputChannel_test.cpp",
Siarhei Vishniakou257553c2019-02-21 14:37:06 -060018 "InputDevice_test.cpp",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070019 "InputEvent_test.cpp",
20 "InputPublisherAndConsumer_test.cpp",
Siarhei Vishniakou39147ce2022-11-15 12:13:04 -080021 "MotionPredictor_test.cpp",
Philip Quinn9b8926e2023-01-31 14:50:02 -080022 "RingBuffer_test.cpp",
Philip Quinn8f953ab2022-12-06 15:37:07 -080023 "TfLiteMotionPredictor_test.cpp",
Siarhei Vishniakou0ced3cc2017-11-21 15:33:17 -080024 "TouchResampling_test.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060025 "TouchVideoFrame_test.cpp",
Siarhei Vishniakoud4b607e2017-06-13 12:21:59 +010026 "VelocityTracker_test.cpp",
Siarhei Vishniakou54d3e182020-01-15 17:38:38 -080027 "VerifiedInputEvent_test.cpp",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070028 ],
Philip Quinn8f953ab2022-12-06 15:37:07 -080029 header_libs: [
30 "flatbuffer_headers",
31 "tensorflow_headers",
32 ],
chaviw98318de2021-05-19 16:45:23 -050033 static_libs: [
Philip Quinn8f953ab2022-12-06 15:37:07 -080034 "libgmock",
chaviw98318de2021-05-19 16:45:23 -050035 "libgui_window_info_static",
36 "libinput",
Philip Quinnda6a4482023-02-07 10:09:57 -080037 "libtflite_static",
Siarhei Vishniakou5e83dfe2022-09-28 17:04:42 -070038 "libui-types",
chaviw98318de2021-05-19 16:45:23 -050039 ],
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070040 cflags: [
41 "-Wall",
Siarhei Vishniakou635cb712017-11-01 16:32:14 -070042 "-Wextra",
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070043 "-Werror",
Philip Quinn8f953ab2022-12-06 15:37:07 -080044 "-Wno-unused-parameter",
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070045 ],
Siarhei Vishniakou659a6242023-02-28 15:13:04 -080046 sanitize: {
Siarhei Vishniakoub15f2642023-05-12 20:15:25 +000047 hwaddress: true,
Siarhei Vishniakou659a6242023-02-28 15:13:04 -080048 undefined: true,
49 all_undefined: true,
50 diag: {
51 undefined: true,
52 },
53 },
Siarhei Vishniakoub15f2642023-05-12 20:15:25 +000054 target: {
55 host: {
56 sanitize: {
57 address: true,
58 },
59 },
60 },
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050061 shared_libs: [
Siarhei Vishniakoud4b607e2017-06-13 12:21:59 +010062 "libbase",
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050063 "libbinder",
64 "libcutils",
65 "liblog",
Siarhei Vishniakou39147ce2022-11-15 12:13:04 -080066 "libPlatformProperties",
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050067 "libutils",
Siarhei Vishniakoua9fd82c2022-05-18 09:42:52 -070068 "libvintf",
Siarhei Vishniakoua8388392020-10-21 23:58:48 -050069 ],
Philip Quinn8f953ab2022-12-06 15:37:07 -080070 data: [
71 "data/*",
72 ":motion_predictor_model.fb",
73 ],
Siarhei Vishniakou5e83dfe2022-09-28 17:04:42 -070074 test_options: {
75 unit_test: true,
76 },
Siarhei Vishniakoua8388392020-10-21 23:58:48 -050077 test_suites: ["device-tests"],
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070078}
79
80// NOTE: This is a compile time test, and does not need to be
81// run. All assertions are static_asserts and will fail during
82// buildtime if something's wrong.
83cc_library_static {
84 name: "StructLayout_test",
85 srcs: ["StructLayout_test.cpp"],
Siarhei Vishniakoudbdb6732021-04-26 19:40:26 +000086 compile_multilib: "both",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070087 cflags: [
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070088 "-Wall",
89 "-Werror",
Siarhei Vishniakou257553c2019-02-21 14:37:06 -060090 "-Wextra",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070091 ],
Robert Carr3720ed02018-08-08 16:08:27 -070092 shared_libs: [
93 "libinput",
94 "libcutils",
95 "libutils",
96 "libbinder",
Robert Carr3720ed02018-08-08 16:08:27 -070097 "libbase",
Philip Junker90bc9492021-12-10 18:39:42 +010098 ],
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070099}