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

Commit 51f7ddfe authored by Andrew Xu's avatar Andrew Xu Committed by Android (Google) Code Review
Browse files

Merge "Revert "Create a SysUI test module with the desktop resource overlay"" into main

parents f48b9369 5d23d550
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -171,9 +171,6 @@
  "desktop-presubmit": [
    {
      "name": "SystemUIGoogleScreenshotTests_desktop"
    },
    {
      "name": "SystemUITests_desktop"
    }
  ],

+2 −18
Original line number Diff line number Diff line
@@ -19,9 +19,8 @@ package {
    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}

// Common configuration for all SystemUI test modules.
java_defaults {
    name: "SystemUITests_defaults",
android_test {
    name: "SystemUITests",
    use_resource_processor: true,
    defaults: ["systemui-non-platform-apis-defaults"],
    dxflags: ["--multi-dex"],
@@ -52,21 +51,6 @@ java_defaults {
    manifest: "AndroidManifest-base.xml",
}

android_test {
    name: "SystemUITests",
    defaults: ["SystemUITests_defaults"],
}

// SystemUI tests that run on desktop with a desktop overlay.
android_test {
    name: "SystemUITests_desktop",
    defaults: ["SystemUITests_defaults"],
    test_config: "AndroidTest-desktop.xml",
    data: [
        "//vendor/google/desktop/overlay_packages/tests/DesktopSysUITestOverlay:DesktopSysUITestOverlay",
    ],
}

test_module_config {
    name: "SystemUITests_systemui_accessibility",
    base: "SystemUITests",
+0 −67
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2025 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 Tests for SystemUI on desktop with a desktop overlay.">
    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="SystemUITests_desktop.apk" />
        <option name="install-arg" value="-t" />
    </target_preparer>

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

    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
        <option name="force-root" value="true" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
        <option name="screen-always-on" value="on" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <!-- Introduce delay between overlay installation and enabling to resolve flakiness -->
        <option name="run-command" value="sleep 2" />
        <option name="run-command" value="cmd overlay enable com.android.systemui.overlay.desktopSysUITest" />
        <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
        <option name="run-command" value="wm dismiss-keyguard" />
    </target_preparer>

    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="framework-base-presubmit" />
    <option name="test-tag" value="SystemUITests" />

    <!-- enable more shards (go/ajur-max-shard) -->
    <option name="ajur-max-shard" value="8" />

    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="package" value="com.android.systemui.tests" />
        <option name="runner" value="android.testing.TestableInstrumentation" />
        <option name="test-filter-dir" value="/data/data/com.android.systemui.tests" />
        <option name="hidden-api-checks" value="false"/>
        <!-- Only run tests annotated to run on desktop. -->
        <option name="include-annotation" value="android.platform.test.annotations.WithDesktopTest"/>
    </test>

    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys"
            value="/data/user/0/com.android.systemui.tests/files"/>
        <option name="collect-on-run-ended-only" value="true"/>
        <option name="clean-up" value="false" />
    </metrics_collector>
</configuration>
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.systemui.brightness.ui.compose

import android.content.res.Configuration
import android.platform.test.annotations.WithDesktopTest
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.runtime.CompositionLocalProvider
@@ -67,7 +66,6 @@ class BrightnessSliderTest : SysuiTestCase() {
    private var localeConfiguration by mutableStateOf(englishLocaleConfiguration)

    @Test
    @WithDesktopTest
    fun stateDescription_hasPercentage() {
        val value = 25
        val range = 0..200