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

Commit 8d77cf0a authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Refactor flickerlib dependencies"

parents 0f9dd1d1 28823f1d
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ android_test {
    name: "WMShellFlickerTests",
    srcs: ["src/**/*.java", "src/**/*.kt"],
    manifest: "AndroidManifest.xml",
    test_config: "AndroidTest.xml",
    test_config: "AndroidTestPhysicalDevices.xml",
    platform_apis: true,
    certificate: "platform",
    test_suites: ["device-tests"],
@@ -32,3 +32,21 @@ android_test {
        "launcher-aosp-tapl"
    ],
}

android_test {
    name: "WMShellFlickerTestsVirtual",
    srcs: ["src/**/*.java", "src/**/*.kt"],
    manifest: "AndroidManifest.xml",
    test_config: "AndroidTestVirtualDevices.xml",
    platform_apis: true,
    certificate: "platform",
    libs: ["android.test.runner"],
    static_libs: [
        "androidx.test.ext.junit",
        "flickerlib",
        "truth-prebuilt",
        "app-helpers-core",
        "launcher-helper-lib",
        "launcher-aosp-tapl"
    ],
}
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
    </target_preparer>
    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
        <option name="package" value="com.android.wm.shell.flicker"/>
        <option name="include-annotation" value="androidx.test.filters.RequiresDevice" />
        <option name="exclude-annotation" value="androidx.test.filters.FlakyTest" />
        <option name="shell-timeout" value="6600s" />
        <option name="test-timeout" value="6000s" />
+41 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
 * Copyright 2020 Google Inc. All Rights Reserved.
 -->
<configuration description="Runs WindowManager Shell Flicker Tests">
    <option name="test-tag" value="FlickerTests" />
    <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
        <!-- keeps the screen on during tests -->
        <option name="screen-always-on" value="on" />
        <!-- prevents the phone from restarting -->
        <option name="force-skip-system-props" value="true" />
        <!-- set WM tracing verbose level to all -->
        <option name="run-command" value="cmd window tracing level all" />
        <!-- inform WM to log all transactions -->
        <option name="run-command" value="cmd window tracing transaction" />
        <!-- restart launcher to activate TAPL -->
        <option name="run-command" value="setprop ro.test_harness 1 ; am force-stop com.google.android.apps.nexuslauncher" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.DeviceCleaner">
        <!-- reboot the device to teardown any crashed tests -->
        <option name="cleanup-action" value="REBOOT" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true"/>
        <option name="test-file-name" value="WMShellFlickerTests.apk"/>
        <option name="test-file-name" value="WMShellFlickerTestApp.apk" />
    </target_preparer>
    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
        <option name="package" value="com.android.wm.shell.flicker"/>
        <option name="exclude-annotation" value="androidx.test.filters.RequiresDevice" />
        <option name="exclude-annotation" value="androidx.test.filters.FlakyTest" />
        <option name="shell-timeout" value="6600s" />
        <option name="test-timeout" value="6000s" />
        <option name="hidden-api-checks" value="false" />
    </test>
    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="directory-keys" value="/storage/emulated/0/Android/data/com.android.wm.shell.flicker/files" />
        <option name="collect-on-run-ended-only" value="true" />
        <option name="clean-up" value="true" />
    </metrics_collector>
</configuration>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.wm.shell.flicker.helpers

import android.app.Instrumentation
import android.support.test.launcherhelper.ILauncherStrategy
import com.android.server.wm.flicker.StandardAppHelper
import com.android.server.wm.flicker.helpers.StandardAppHelper

abstract class FlickerAppHelper(
    instr: Instrumentation,
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.wm.shell.flicker.pip

import android.view.Surface
import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.dsl.flicker
import com.android.server.wm.flicker.helpers.closePipWindow
import com.android.server.wm.flicker.helpers.expandPipWindow
@@ -41,7 +41,7 @@ import org.junit.runners.Parameterized
 * Test Pip launch.
 * To run this test: `atest FlickerTests:PipToAppTest`
 */
@LargeTest
@RequiresDevice
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 152738416)
Loading