• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
14
15package {
16    default_team: "trendy_team_input_framework",
17    // See: http://go/android-license-faq
18    // A large-scale-change added 'default_applicable_licenses' to import
19    // all of the 'license_kinds' from "frameworks_native_license"
20    // to get the below license kinds:
21    //   SPDX-license-identifier-Apache-2.0
22    default_applicable_licenses: ["frameworks_native_license"],
23}
24
25// Source files shared with InputDispatcher's benchmarks and fuzzers
26filegroup {
27    name: "inputdispatcher_common_test_sources",
28    srcs: [
29        "FakeInputDispatcherPolicy.cpp",
30        "FakeWindows.cpp",
31    ],
32}
33
34cc_test {
35    name: "inputflinger_tests",
36    host_supported: true,
37    defaults: [
38        "inputflinger_defaults",
39        // For all targets inside inputflinger, these tests build all of their sources using their
40        // defaults rather than including them as shared or static libraries. By doing so, the tests
41        // will always run against the compiled version of the inputflinger code rather than the
42        // version on the device.
43        "libinputdispatcher_defaults",
44        "libinputflinger_base_defaults",
45        "libinputflinger_defaults",
46        "libinputreader_defaults",
47        "libinputreporter_defaults",
48    ],
49    srcs: [
50        ":inputdispatcher_common_test_sources",
51        "AndroidInputEventProtoConverter_test.cpp",
52        "AnrTracker_test.cpp",
53        "CapturedTouchpadEventConverter_test.cpp",
54        "CursorInputMapper_test.cpp",
55        "DisplayTopologyGraph_test.cpp",
56        "EventHub_test.cpp",
57        "FakeEventHub.cpp",
58        "FakeInputReaderPolicy.cpp",
59        "FakeInputTracingBackend.cpp",
60        "FakePointerController.cpp",
61        "FocusResolver_test.cpp",
62        "GestureConverter_test.cpp",
63        "HardwareProperties_test.cpp",
64        "HardwareStateConverter_test.cpp",
65        "InputDeviceMetricsCollector_test.cpp",
66        "InputDeviceMetricsSource_test.cpp",
67        "InputDispatcher_test.cpp",
68        "InputMapperTest.cpp",
69        "InputProcessorConverter_test.cpp",
70        "InputProcessor_test.cpp",
71        "InputReader_test.cpp",
72        "InputTraceSession.cpp",
73        "InputTracingTest.cpp",
74        "InstrumentedInputReader.cpp",
75        "JoystickInputMapper_test.cpp",
76        "KeyboardInputMapper_test.cpp",
77        "LatencyTracker_test.cpp",
78        "MultiTouchInputMapper_test.cpp",
79        "MultiTouchMotionAccumulator_test.cpp",
80        "NotifyArgs_test.cpp",
81        "PointerChoreographer_test.cpp",
82        "PreferStylusOverTouch_test.cpp",
83        "PropertyProvider_test.cpp",
84        "RotaryEncoderInputMapper_test.cpp",
85        "SensorInputMapper_test.cpp",
86        "SlopController_test.cpp",
87        "SwitchInputMapper_test.cpp",
88        "SyncQueue_test.cpp",
89        "TestInputListener.cpp",
90        "TimerProvider_test.cpp",
91        "TouchpadInputMapper_test.cpp",
92        "UinputDevice.cpp",
93        "UnwantedInteractionBlocker_test.cpp",
94        "VibratorInputMapper_test.cpp",
95    ],
96    aidl: {
97        include_dirs: [
98            "frameworks/native/libs/gui",
99            "frameworks/native/libs/input",
100        ],
101    },
102    target: {
103        android: {
104            shared_libs: [
105                "libvintf",
106            ],
107        },
108    },
109    sanitize: {
110        hwaddress: true,
111        undefined: true,
112        all_undefined: true,
113        diag: {
114            cfi: true,
115            integer_overflow: true,
116            memtag_heap: true,
117            undefined: true,
118            misc_undefined: [
119                "all",
120                "bounds",
121            ],
122        },
123    },
124    static_libs: [
125        "libflagtest",
126        "libgmock",
127    ],
128    require_root: true,
129    test_options: {
130        unit_test: true,
131    },
132    test_suites: [
133        "device-platinum-tests",
134        "device-tests",
135    ],
136    native_coverage: false,
137}
138