Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 1 | // Copyright (C) 2020 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 14 | |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_native_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_native_license"], |
| 22 | } |
| 23 | |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 24 | cc_test { |
| 25 | name: "inputflinger_tests", |
Siarhei Vishniakou | 3197718 | 2022-09-30 08:51:23 -0700 | [diff] [blame] | 26 | host_supported: true, |
Prabir Pradhan | 9244aea | 2020-02-05 20:31:40 -0800 | [diff] [blame] | 27 | defaults: [ |
| 28 | "inputflinger_defaults", |
| 29 | // For all targets inside inputflinger, these tests build all of their sources using their |
| 30 | // defaults rather than including them as shared or static libraries. By doing so, the tests |
| 31 | // will always run against the compiled version of the inputflinger code rather than the |
| 32 | // version on the device. |
| 33 | "libinputflinger_base_defaults", |
| 34 | "libinputreader_defaults", |
| 35 | "libinputreporter_defaults", |
| 36 | "libinputdispatcher_defaults", |
| 37 | "libinputflinger_defaults", |
| 38 | ], |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 39 | srcs: [ |
Siarhei Vishniakou | d44dddf | 2020-03-25 16:16:40 -0700 | [diff] [blame] | 40 | "AnrTracker_test.cpp", |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 41 | "BlockingQueue_test.cpp", |
Siarhei Vishniakou | 8588cc9 | 2018-12-12 18:17:58 -0800 | [diff] [blame] | 42 | "EventHub_test.cpp", |
Harry Cutts | a5b7129 | 2022-11-28 12:56:17 +0000 | [diff] [blame^] | 43 | "FakeEventHub.cpp", |
Vishnu Nair | c519ff7 | 2021-01-21 08:23:08 -0800 | [diff] [blame] | 44 | "FocusResolver_test.cpp", |
Siarhei Vishniakou | 9899603 | 2022-08-03 11:54:47 -0700 | [diff] [blame] | 45 | "InputProcessor_test.cpp", |
| 46 | "InputProcessorConverter_test.cpp", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 47 | "InputDispatcher_test.cpp", |
Siarhei Vishniakou | 473174e | 2017-12-27 16:44:42 -0800 | [diff] [blame] | 48 | "InputReader_test.cpp", |
Siarhei Vishniakou | f265212 | 2021-03-05 21:39:46 +0000 | [diff] [blame] | 49 | "LatencyTracker_test.cpp", |
Siarhei Vishniakou | a3c8e51 | 2022-02-10 19:46:34 -0800 | [diff] [blame] | 50 | "PreferStylusOverTouch_test.cpp", |
Vishnu Nair | e798b47 | 2020-07-23 13:52:21 -0700 | [diff] [blame] | 51 | "TestInputListener.cpp", |
Prabir Pradhan | e0105c9 | 2019-12-26 12:32:13 -0800 | [diff] [blame] | 52 | "UinputDevice.cpp", |
Siarhei Vishniakou | ba0a875 | 2021-09-14 14:43:25 -0700 | [diff] [blame] | 53 | "UnwantedInteractionBlocker_test.cpp", |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 54 | ], |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 55 | aidl: { |
| 56 | include_dirs: [ |
chaviw | 98318de | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 57 | "frameworks/native/libs/gui", |
Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 58 | "frameworks/native/libs/input", |
| 59 | ], |
| 60 | }, |
Siarhei Vishniakou | 3197718 | 2022-09-30 08:51:23 -0700 | [diff] [blame] | 61 | target: { |
| 62 | android: { |
| 63 | shared_libs: [ |
| 64 | "libinput", |
| 65 | "libvintf", |
| 66 | ], |
| 67 | }, |
| 68 | host: { |
| 69 | include_dirs: [ |
| 70 | "bionic/libc/kernel/android/uapi/", |
| 71 | "bionic/libc/kernel/uapi", |
| 72 | ], |
| 73 | cflags: [ |
| 74 | "-D__ANDROID_HOST__", |
| 75 | ], |
| 76 | static_libs: [ |
| 77 | "libinput", |
| 78 | ], |
| 79 | }, |
| 80 | }, |
Chris Ye | 8594e19 | 2020-07-14 10:34:06 -0700 | [diff] [blame] | 81 | static_libs: [ |
Siarhei Vishniakou | 60a1588 | 2022-01-31 09:00:15 -0800 | [diff] [blame] | 82 | "libc++fs", |
Siarhei Vishniakou | 88151b8 | 2022-08-11 00:53:38 +0000 | [diff] [blame] | 83 | "libgmock", |
Chris Ye | 8594e19 | 2020-07-14 10:34:06 -0700 | [diff] [blame] | 84 | ], |
Siarhei Vishniakou | 3197718 | 2022-09-30 08:51:23 -0700 | [diff] [blame] | 85 | shared_libs: [ |
| 86 | "libinputreader", |
| 87 | ], |
Siarhei Vishniakou | 8588cc9 | 2018-12-12 18:17:58 -0800 | [diff] [blame] | 88 | require_root: true, |
Siarhei Vishniakou | 3197718 | 2022-09-30 08:51:23 -0700 | [diff] [blame] | 89 | test_options: { |
| 90 | unit_test: true, |
| 91 | }, |
Siarhei Vishniakou | a838839 | 2020-10-21 23:58:48 -0500 | [diff] [blame] | 92 | test_suites: ["device-tests"], |
Colin Cross | 45a1b9c | 2017-04-19 16:56:46 -0700 | [diff] [blame] | 93 | } |