Promote/demote flicker tests

Promote stable postsubmit to presubmit
Demote unstable postsubmit to flaky
Demote fass assertions to flaky

Test: atest FlickerTests WMShellFlickerTests
Change-Id: I48c4e26b05873a3305cd814b5cb4bedcae9def81
This commit is contained in:
Nataniel Borges
2021-12-01 16:46:39 +01:00
parent 38c7256861
commit 184d33e1ab
16 changed files with 38 additions and 80 deletions

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.apppairs
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
@@ -83,7 +82,7 @@ class AppPairsTestCannotPairNonResizeableApps(
@Test
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()
@Postsubmit
@Presubmit
@Test
override fun statusBarLayerRotatesScales() {
// This test doesn't work in shell transitions because of b/206753786

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.apppairs
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
@@ -87,7 +86,7 @@ class AppPairsTestSupportPairNonResizeableApps(
@Test
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()
@Postsubmit
@Presubmit
@Test
override fun statusBarLayerRotatesScales() {
// This test doesn't work in shell transitions because of b/206753786

View File

@@ -17,7 +17,6 @@
package com.android.wm.shell.flicker.apppairs
import android.os.SystemClock
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
@@ -72,7 +71,7 @@ class AppPairsTestUnpairPrimaryAndSecondaryApps(
@Test
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()
@Postsubmit
@Presubmit
@Test
override fun statusBarLayerRotatesScales() {
// This test doesn't work in shell transitions because of b/206753786

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.apppairs
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.RequiresDevice
@@ -87,7 +86,7 @@ class RotateTwoLaunchedAppsInAppPairsMode(
testSpec.appPairsPrimaryBoundsIsVisibleAtEnd(testSpec.endRotation,
primaryApp.component)
@Postsubmit
@Presubmit
@Test
fun appPairsSecondaryBoundsIsVisibleAtEnd() =
testSpec.appPairsSecondaryBoundsIsVisibleAtEnd(testSpec.endRotation,

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.apppairs
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.RequiresDevice
@@ -89,13 +88,13 @@ class RotateTwoLaunchedAppsRotateAndEnterAppPairsMode(
}
}
@Postsubmit
@Presubmit
@Test
fun appPairsPrimaryBoundsIsVisibleAtEnd() =
testSpec.appPairsPrimaryBoundsIsVisibleAtEnd(testSpec.endRotation,
primaryApp.component)
@Postsubmit
@Presubmit
@Test
fun appPairsSecondaryBoundsIsVisibleAtEnd() =
testSpec.appPairsSecondaryBoundsIsVisibleAtEnd(testSpec.endRotation,

View File

@@ -16,7 +16,7 @@
package com.android.wm.shell.flicker.bubble
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import androidx.test.uiautomator.By
import androidx.test.uiautomator.Until
@@ -59,7 +59,7 @@ class ExpandBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(test
}
}
@Postsubmit
@Presubmit
@Test
fun testAppIsAlwaysVisible() {
testSpec.assertLayers {

View File

@@ -17,7 +17,7 @@
package com.android.wm.shell.flicker.bubble
import android.os.SystemClock
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import androidx.test.uiautomator.By
import androidx.test.uiautomator.Until
@@ -67,7 +67,7 @@ class MultiBubblesScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(test
}
}
@Postsubmit
@Presubmit
@Test
fun testAppIsAlwaysVisible() {
testSpec.assertLayers {

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.FlakyTest
@@ -73,13 +72,13 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
}
}
@Postsubmit
@FlakyTest
@Test
fun runPresubmitAssertion() {
flickerRule.checkPresubmitAssertions()
}
@Postsubmit
@FlakyTest
@Test
fun runPostsubmitAssertion() {
flickerRule.checkPostsubmitAssertions()

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.FlakyTest
@@ -82,13 +81,13 @@ class ExitPipViaIntentTest(testSpec: FlickerTestParameter) : ExitPipToAppTransit
}
}
@Postsubmit
@FlakyTest
@Test
fun runPresubmitAssertion() {
flickerRule.checkPresubmitAssertions()
}
@Postsubmit
@FlakyTest
@Test
fun runPostsubmitAssertion() {
flickerRule.checkPostsubmitAssertions()

View File

@@ -16,7 +16,6 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.FlakyTest
@@ -72,13 +71,13 @@ class ExitPipWithDismissButtonTest(testSpec: FlickerTestParameter) : ExitPipTran
}
}
@Postsubmit
@FlakyTest
@Test
fun runPresubmitAssertion() {
flickerRule.checkPresubmitAssertions()
}
@Postsubmit
@FlakyTest
@Test
fun runPostsubmitAssertion() {
flickerRule.checkPostsubmitAssertions()

View File

@@ -17,6 +17,7 @@
package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
@@ -83,27 +84,11 @@ class SetRequestedOrientationWhilePinnedTest(
}
}
@Postsubmit
@Test
override fun navBarLayerIsVisible() = super.navBarLayerIsVisible()
@Postsubmit
@Test
override fun navBarWindowIsVisible() = super.navBarWindowIsVisible()
@Postsubmit
@Test
override fun statusBarLayerIsVisible() = super.statusBarLayerIsVisible()
@Postsubmit
@Test
override fun statusBarWindowIsVisible() = super.statusBarWindowIsVisible()
@FlakyTest
@Test
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()
@Postsubmit
@Presubmit
@Test
override fun statusBarLayerRotatesScales() {
// This test doesn't work in shell transitions because of b/206753786
@@ -119,7 +104,7 @@ class SetRequestedOrientationWhilePinnedTest(
}
}
@Postsubmit
@Presubmit
@Test
fun pipAppShowsOnTop() {
testSpec.assertWmEnd {
@@ -135,7 +120,7 @@ class SetRequestedOrientationWhilePinnedTest(
}
}
@Postsubmit
@Presubmit
@Test
fun pipAlwaysVisible() = testSpec.assertWm {
this.isAppWindowVisible(pipApp.component)
@@ -149,10 +134,6 @@ class SetRequestedOrientationWhilePinnedTest(
}
}
@Postsubmit
@Test
override fun entireScreenCovered() = super.entireScreenCovered()
companion object {
@Parameterized.Parameters(name = "{0}")
@JvmStatic

View File

@@ -17,7 +17,6 @@
package com.android.server.wm.flicker.ime
import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.WindowManagerPolicyConstants
@@ -105,7 +104,7 @@ class CloseImeAutoOpenWindowToHomeTest(private val testSpec: FlickerTestParamete
}
}
@Postsubmit
@Presubmit
@Test
fun imeAppWindowBecomesInvisible() {
testSpec.assertWm {

View File

@@ -17,7 +17,6 @@
package com.android.server.wm.flicker.ime
import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.WindowManagerPolicyConstants
@@ -106,7 +105,7 @@ class CloseImeWindowToHomeTest(private val testSpec: FlickerTestParameter) {
@Test
fun imeWindowBecomesInvisible() = testSpec.imeWindowBecomesInvisible()
@Postsubmit
@Presubmit
@Test
fun imeAppWindowBecomesInvisible() {
testSpec.assertWm {

View File

@@ -17,7 +17,6 @@
package com.android.server.wm.flicker.ime
import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.WindowManagerPolicyConstants
@@ -144,7 +143,7 @@ class OpenImeWindowTest(private val testSpec: FlickerTestParameter) {
}
}
@Postsubmit
@Presubmit
@Test
fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
testSpec.assertWm {

View File

@@ -94,7 +94,7 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti
* Checks that the nav bar layer starts visible, becomes invisible during unlocking animation
* and becomes visible at the end
*/
@Postsubmit
@FlakyTest
@Test
fun navBarLayerVisibilityChanges() {
testSpec.assertLayers {
@@ -156,7 +156,7 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti
* Checks that the nav bar starts the transition visible, then becomes invisible during
* then unlocking animation and becomes visible at the end of the transition
*/
@Postsubmit
@FlakyTest
@Test
fun navBarWindowsVisibilityChanges() {
testSpec.assertWm {
@@ -168,11 +168,6 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti
}
}
/** {@inheritDoc} */
@Postsubmit
@Test
override fun statusBarWindowIsVisible() = super.statusBarWindowIsVisible()
/**
* Checks that the status bar layer is visible at the end of the trace
*
@@ -210,12 +205,6 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti
}
}
/** {@inheritDoc} */
@Postsubmit
@Test
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
@FlakyTest
@Test
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()

View File

@@ -17,7 +17,6 @@
package com.android.server.wm.flicker.quickswitch
import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
import android.view.Surface
@@ -126,7 +125,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that the transition starts with [testApp1]'s windows filling/covering exactly the
* entirety of the display.
*/
@Postsubmit
@Presubmit
@Test
fun startsWithApp1WindowsCoverFullScreen() {
testSpec.assertWmStart {
@@ -138,7 +137,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that the transition starts with [testApp1]'s layers filling/covering exactly the
* entirety of the display.
*/
@Postsubmit
@Presubmit
@Test
fun startsWithApp1LayersCoverFullScreen() {
testSpec.assertLayersStart {
@@ -149,7 +148,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
/**
* Checks that the transition starts with [testApp1] being the top window.
*/
@Postsubmit
@Presubmit
@Test
fun startsWithApp1WindowBeingOnTop() {
testSpec.assertWmStart {
@@ -161,7 +160,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp2] windows fill the entire screen (i.e. is "fullscreen") at the end of the
* transition once we have fully quick switched from [testApp1] back to the [testApp2].
*/
@Postsubmit
@Presubmit
@Test
fun endsWithApp2WindowsCoveringFullScreen() {
testSpec.assertWmEnd {
@@ -173,7 +172,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp2] layers fill the entire screen (i.e. is "fullscreen") at the end of the
* transition once we have fully quick switched from [testApp1] back to the [testApp2].
*/
@Postsubmit
@Presubmit
@Test
fun endsWithApp2LayersCoveringFullScreen() {
testSpec.assertLayersEnd {
@@ -185,7 +184,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp2] is the top window at the end of the transition once we have fully quick
* switched from [testApp1] back to the [testApp2].
*/
@Postsubmit
@Presubmit
@Test
fun endsWithApp2BeingOnTop() {
testSpec.assertWmEnd {
@@ -197,7 +196,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp2]'s window starts off invisible and becomes visible at some point before
* the end of the transition and then stays visible until the end of the transition.
*/
@Postsubmit
@Presubmit
@Test
fun app2WindowBecomesAndStaysVisible() {
testSpec.assertWm {
@@ -213,7 +212,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp2]'s layer starts off invisible and becomes visible at some point before
* the end of the transition and then stays visible until the end of the transition.
*/
@Postsubmit
@Presubmit
@Test
fun app2LayerBecomesAndStaysVisible() {
testSpec.assertLayers {
@@ -227,7 +226,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp1]'s window starts off visible and becomes invisible at some point before
* the end of the transition and then stays invisible until the end of the transition.
*/
@Postsubmit
@Presubmit
@Test
fun app1WindowBecomesAndStaysInvisible() {
testSpec.assertWm {
@@ -241,7 +240,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Checks that [testApp1]'s layer starts off visible and becomes invisible at some point before
* the end of the transition and then stays invisible until the end of the transition.
*/
@Postsubmit
@Presubmit
@Test
fun app1LayerBecomesAndStaysInvisible() {
testSpec.assertLayers {
@@ -256,7 +255,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
* visible.
*/
@Postsubmit
@Presubmit
@Test
fun app2WindowIsVisibleOnceApp1WindowIsInvisible() {
testSpec.assertWm {
@@ -275,7 +274,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
* Ensures that at any point, either [testApp2] or [testApp1]'s windows are at least partially
* visible.
*/
@Postsubmit
@Presubmit
@Test
fun app2LayerIsVisibleOnceApp1LayerIsInvisible() {
testSpec.assertLayers {
@@ -292,7 +291,7 @@ class QuickSwitchBetweenTwoAppsForwardTest(private val testSpec: FlickerTestPara
/**
* Checks that the navbar window is visible throughout the entire transition.
*/
@Postsubmit
@Presubmit
@Test
fun navBarWindowIsAlwaysVisible() = testSpec.navBarWindowIsVisible()