Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3598052 authored by Harry Cutts's avatar Harry Cutts
Browse files

uinput: add unit tests for evemu parsing

Bug: 302297266
Test: atest UinputTests
Change-Id: I7b4c6fa87f6ba50147f3ddeb9b8e4ceaa238ffc1
parent 21dedc40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ java_binary {
    name: "uinput",
    wrapper: "uinput.sh",
    srcs: [
        "**/*.java",
        "src/**/*.java",
        ":uinputcommand_aidl",
    ],
    required: ["libuinputcommand_jni"],
+12 −0
Original line number Diff line number Diff line
{
  "imports": [
    {
      "path": "frameworks/native/services/inputflinger"
    }
  ],
  "postsubmit": [
    {
      "name": "UinputTests"
    }
  ]
}
+20 −0
Original line number Diff line number Diff line
package {
    default_applicable_licenses: ["frameworks_base_cmds_uinput_license"],
}

android_test {
    name: "UinputTests",
    srcs: [
        "src/**/*.java",
    ],
    static_libs: [
        "androidx.test.runner",
        "frameworks-base-testutils",
        "platform-test-annotations",
        "truth",
        "uinput",
    ],
    test_suites: [
        "device-tests",
    ],
}
+29 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2023 The Android Open Source Project

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.commands.uinput.tests">

    <application android:debuggable="true">
        <uses-library android:name="android.test.runner" />
    </application>

    <instrumentation
        android:name="androidx.test.runner.AndroidJUnitRunner"
        android:label="Uinput Tests"
        android:targetPackage="com.android.commands.uinput.tests" />
</manifest>
+476 −0

File added.

Preview size limit exceeded, changes collapsed.