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

Commit f12993f1 authored by Xiang Wang's avatar Xiang Wang
Browse files

Move HintManagerServiceTest out of FrameworksServicesTests

to a standlone module PerformanceHintTests

Bug: 354947394
Flag: TEST_ONLY
Test: atest PerformanceHintTests
Test: atest --test-mapping services/core/java/com/android/server/power/hint/:postsubmit
Test: atest --test-mapping services/tests/performancehinttests:postsubmit
Change-Id: If0782896bd4cc49d70833c169006ed3bc95d37e5
parent 94b25af6
Loading
Loading
Loading
Loading
+7 −16
Original line number Diff line number Diff line
{
  "presubmit": [
  "postsubmit": [
    {
      "name": "FrameworksServicesTests",
      "name": "PerformanceHintTests",
      "options": [
        {
          "include-filter": "com.android.server.power.hint"
        },
        {
          "exclude-annotation": "androidx.test.filters.FlakyTest"
        }
        {"exclude-annotation": "androidx.test.filters.FlakyTest"},
        {"exclude-annotation": "org.junit.Ignore"}
      ]
    }
  ],
  "postsubmit": [
    },
    {
      "name": "CtsStatsdAtomHostTestCases",
      "options": [
        {"include-filter": "android.cts.statsdatom.performancehintmanager"},
        {"exclude-annotation": "androidx.test.filters.FlakyTest"},
        {"exclude-annotation": "org.junit.Ignore"},
        {"include-filter": "android.cts.statsdatom.performancehintmanager"}
      ],
      "file_patterns": [
        "(/|^)HintManagerService.java"
        {"exclude-annotation": "org.junit.Ignore"}
      ]
    }
  ]
+49 −0
Original line number Diff line number Diff line
package {
    default_team: "trendy_team_games",
    default_applicable_licenses: ["frameworks_base_license"],
}

android_test {
    name: "PerformanceHintTests",
    srcs: [
        "src/**/*.java",
    ],
    static_libs: [
        "androidx.test.runner",
        "androidx.test.rules",
        "flag-junit",
        "junit",
        "mockito-target-minus-junit4",
        "platform-test-annotations",
        "services.core",
        "truth",
    ],
    libs: [
        "android.test.base",
    ],
    test_suites: [
        "automotive-tests",
        "device-tests",
    ],
    platform_apis: true,
    certificate: "platform",
    dxflags: ["--multi-dex"],
    optimize: {
        enabled: false,
    },
}

android_ravenwood_test {
    name: "PerformanceHintTestsRavenwood",
    static_libs: [
        "androidx.annotation_annotation",
        "androidx.test.rules",
        "flag-junit",
        "services.core",

    ],
    srcs: [
        "src/**/*.java",
    ],
    auto_gen_config: true,
}
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 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.server.power.hinttests">

    <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
         android:targetPackage="com.android.server.power.hinttests"
         android:label="ADPF Performance Hint Service Test"/>
</manifest>
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 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.
-->
<configuration description="Runs Performance Hint Tests.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-instrumentation" />

    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="install-arg" value="-t" />
        <option name="test-file-name" value="PerformanceHintTests.apk" />
    </target_preparer>

    <option name="test-tag" value="PerformanceHintTests" />

    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.server.power.hinttests" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
        <option name="hidden-api-checks" value="false"/>
        <option name="exclude-annotation" value="androidx.test.filters.FlakyTest" />
    </test>
</configuration>
Loading