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

Commit f66138d4 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Reorganize PiP flicker code, move apps tests to new target

Moving the shared abstract classes to common subdirectory and moving
the 1P/3P apps related code to apps subdirectory.

Created a new build target for the apps tests so that they can be run
manually on demand separately, and also prevent running them with every
presubmit/postsubmit run.

Bug: 282758103
Test: atest WMShellFlickerTestsPip
Test: atest WMShellFlickerTestsPipApps
Change-Id: I431499a08ad4dbd15e2b83e71af643e411c706b9
parent 9cc31f28
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -43,6 +43,16 @@ filegroup {
    srcs: ["src/com/android/wm/shell/flicker/pip/*.kt"],
}

filegroup {
    name: "WMShellFlickerTestsPipCommon-src",
    srcs: ["src/com/android/wm/shell/flicker/pip/common/*.kt"],
}

filegroup {
    name: "WMShellFlickerTestsPipApps-src",
    srcs: ["src/com/android/wm/shell/flicker/pip/apps/*.kt"],
}

filegroup {
    name: "WMShellFlickerTestsSplitScreenBase-src",
    srcs: [
@@ -152,6 +162,8 @@ android_test {
    exclude_srcs: [
        ":WMShellFlickerTestsBubbles-src",
        ":WMShellFlickerTestsPip-src",
        ":WMShellFlickerTestsPipCommon-src",
        ":WMShellFlickerTestsPipApps-src",
        ":WMShellFlickerTestsSplitScreenGroup1-src",
        ":WMShellFlickerTestsSplitScreenGroup2-src",
        ":WMShellFlickerTestsSplitScreenBase-src",
@@ -181,6 +193,20 @@ android_test {
    srcs: [
        ":WMShellFlickerTestsBase-src",
        ":WMShellFlickerTestsPip-src",
        ":WMShellFlickerTestsPipCommon-src",
    ],
}

android_test {
    name: "WMShellFlickerTestsPipApps",
    defaults: ["WMShellFlickerTestsDefault"],
    additional_manifests: ["manifests/AndroidManifestPip.xml"],
    package_name: "com.android.wm.shell.flicker.pip.apps",
    instrumentation_target_package: "com.android.wm.shell.flicker.pip.apps",
    srcs: [
        ":WMShellFlickerTestsBase-src",
        ":WMShellFlickerTestsPipApps-src",
        ":WMShellFlickerTestsPipCommon-src",
    ],
}

+2 −2
Original line number Diff line number Diff line
@@ -60,9 +60,9 @@
    <!-- Enable mocking GPS location by the test app -->
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command"
                value="appops set com.android.wm.shell.flicker.pip android:mock_location allow"/>
                value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location allow"/>
        <option name="teardown-command"
                value="appops set com.android.wm.shell.flicker.pip android:mock_location deny"/>
                value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location deny"/>
    </target_preparer>

    <!-- Needed for pushing the trace config file -->
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import com.android.wm.shell.flicker.pip.common.ClosePipTransition
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import com.android.wm.shell.flicker.pip.common.EnterPipTransition
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
Loading