blob: fe8a5677d95e5323d0f63eefc15bad1f41afa5a7 [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",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070013 srcs: [
Chris Ye173871c2020-09-08 09:55:14 -070014 "NamedEnum_test.cpp",
Michael Wright44753b12020-07-08 13:48:11 +010015 "Flags_test.cpp",
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 Vishniakou5ac663d2019-02-15 17:15:56 -060021 "InputWindow_test.cpp",
Atif Niyaz83846822019-07-18 15:17:40 -070022 "LatencyStatistics_test.cpp",
Siarhei Vishniakou5ac663d2019-02-15 17:15:56 -060023 "TouchVideoFrame_test.cpp",
Siarhei Vishniakoud4b607e2017-06-13 12:21:59 +010024 "VelocityTracker_test.cpp",
Siarhei Vishniakou54d3e182020-01-15 17:38:38 -080025 "VerifiedInputEvent_test.cpp",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070026 ],
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070027 cflags: [
28 "-Wall",
Siarhei Vishniakou635cb712017-11-01 16:32:14 -070029 "-Wextra",
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070030 "-Werror",
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070031 ],
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050032 static_libs: [
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070033 "libinput",
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050034 ],
35 shared_libs: [
Siarhei Vishniakoud4b607e2017-06-13 12:21:59 +010036 "libbase",
Siarhei Vishniakoue9cadca2020-09-14 18:24:51 -050037 "libbinder",
38 "libcutils",
39 "liblog",
40 "libui",
41 "libutils",
Siarhei Vishniakoua8388392020-10-21 23:58:48 -050042 ],
43 test_suites: ["device-tests"],
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070044}
45
46// NOTE: This is a compile time test, and does not need to be
47// run. All assertions are static_asserts and will fail during
48// buildtime if something's wrong.
49cc_library_static {
50 name: "StructLayout_test",
51 srcs: ["StructLayout_test.cpp"],
52 cflags: [
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070053 "-O0",
Chih-Hung Hsieh687a0d12017-10-05 15:20:11 -070054 "-Wall",
55 "-Werror",
Siarhei Vishniakou257553c2019-02-21 14:37:06 -060056 "-Wextra",
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070057 ],
Robert Carr3720ed02018-08-08 16:08:27 -070058 shared_libs: [
59 "libinput",
60 "libcutils",
61 "libutils",
62 "libbinder",
63 "libui",
64 "libbase",
65 ]
Dan Willemsenc7dd2b92016-08-25 17:05:22 -070066}