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

Commit 2380c929 authored by Ahmad Khalil's avatar Ahmad Khalil
Browse files

Extract vibrator core tests from FrameworksCoreTests

Move all tests for package android.os that are related to the vibrator from frameworks/base/core/tests/coretests/ to a new folder frameworks/base/core/tests/vibrator/.

Fix: 290746348
Test: atest FrameworksVibratorCoreTests
Change-Id: I0ee71b202e055b10db1d8e697118cb91ed57b620
parent a7d8d2c6
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "file_patterns": [
        "[^/]*(Vibrator|Vibration)[^/]*\\.java",
        "vibrator/.*"
      ],
      "name": "FrameworksVibratorCoreTests",
      "options": [
        {"exclude-annotation": "android.platform.test.annotations.LargeTest"},
        {"exclude-annotation": "android.platform.test.annotations.FlakyTest"},
        {"exclude-annotation": "androidx.test.filters.FlakyTest"},
        {"exclude-annotation": "org.junit.Ignore"}
      ]
    },
    {
      "file_patterns": ["Bugreport[^/]*\\.java"],
      "name": "BugreportManagerTestCases",
+40 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    default_applicable_licenses: ["frameworks_base_license"],
}

android_test {
    name: "FrameworksVibratorCoreTests",

    srcs: [
        "src/**/*.java",
    ],

    static_libs: [
        "frameworks-base-testutils",
        "guava",
        "androidx.core_core",
        "androidx.test.ext.junit",
        "androidx.test.runner",
        "androidx.test.rules",
        "mockito-target-minus-junit4",
        "truth-prebuilt",
        "testng",
    ],

    libs: [
        "android.test.runner",
        "android.test.base",
        "android.test.mock",
        "framework",
        "framework-res",
    ],

    sdk_version: "core_platform",
    test_suites: [
        "device-tests",
        "automotive-tests",
    ],

    certificate: "platform",
}
+30 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 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.frameworks.core.tests.vibrator">

    <!-- vibrator test permissions -->
    <uses-permission android:name="android.permission.VIBRATE" />

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

    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
            android:targetPackage="com.android.frameworks.core.tests.vibrator"
            android:label="Frameworks Vibrator Core Tests" />
</manifest>
+1 −0
Original line number Diff line number Diff line
# Bug component: 345036
include platform/frameworks/base:/services/core/java/com/android/server/vibrator/OWNERS
 No newline at end of file
+22 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "FrameworksVibratorCoreTests",
      "options": [
        {"exclude-annotation": "android.platform.test.annotations.LargeTest"},
        {"exclude-annotation": "android.platform.test.annotations.FlakyTest"},
        {"exclude-annotation": "androidx.test.filters.FlakyTest"},
        {"exclude-annotation": "org.junit.Ignore"}
      ]
    }
  ],
  "postsubmit": [
    {
      "name": "FrameworksVibratorCoreTests",
      "options": [
        {"exclude-annotation": "org.junit.Ignore"}
      ]
    }
  ]
}
Loading