Use only @FlakyTest annotations on FlickerTests
Currently the FlickerTests tests do not work with @FlakyTest annotation, depending instead on @Ignore. Fix dependencies so that it requires only @FlakyTest annotations now.
Test: atest FlickerTests
Change-Id: If762c5d9f9844885fbd998177512decb08dcf125
diff --git a/tests/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp
index 070dacb..5161fba 100644
--- a/tests/FlickerTests/Android.bp
+++ b/tests/FlickerTests/Android.bp
@@ -28,6 +28,7 @@
"flickerlib",
"truth-prebuilt",
"app-helpers-core",
+ "launcher-helper-lib",
"launcher-aosp-tapl"
],
}
diff --git a/tests/FlickerTests/AndroidTest.xml b/tests/FlickerTests/AndroidTest.xml
index 58df2a8..68c99a3 100644
--- a/tests/FlickerTests/AndroidTest.xml
+++ b/tests/FlickerTests/AndroidTest.xml
@@ -27,7 +27,7 @@
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
<option name="package" value="com.android.server.wm.flicker"/>
- <option name="exclude-annotation" value="org.junit.Ignore" />
+ <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" />
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/DebugTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/DebugTest.kt
index f871ea5..43cfdff 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/DebugTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/DebugTest.kt
@@ -20,22 +20,24 @@
import android.util.Rational
import android.view.Surface
import androidx.test.InstrumentationRegistry
+import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import androidx.test.runner.AndroidJUnit4
import androidx.test.uiautomator.UiDevice
import com.android.server.wm.flicker.helpers.ImeAppHelper
import com.android.server.wm.flicker.helpers.PipAppHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
/**
* Tests to help debug individual transitions, capture video recordings and create test cases.
+ *
+ * Not actual tests
*/
@LargeTest
-@Ignore("Used for debugging transitions used in FlickerTests.")
+@FlakyTest
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class DebugTest {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/NonRotationTestBase.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/NonRotationTestBase.kt
index 653fecd..1f8150c 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/NonRotationTestBase.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/NonRotationTestBase.kt
@@ -18,7 +18,6 @@
import android.view.Surface
import androidx.test.filters.FlakyTest
-import org.junit.Ignore
import org.junit.Test
import org.junit.runners.Parameterized
@@ -27,7 +26,6 @@
protected val beginRotation: Int
) : FlickerTestBase() {
@FlakyTest(bugId = 141361128)
- @Ignore("Waiting bug feedback")
@Test
fun checkCoveredRegion_noUncoveredRegions() {
val displayBounds = WindowUtils.getDisplayBounds(beginRotation)
@@ -38,7 +36,6 @@
}
@FlakyTest(bugId = 141361128)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarLayerIsAlwaysVisible() {
checkResults {
@@ -48,7 +45,6 @@
}
@FlakyTest(bugId = 141361128)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarLayerIsAlwaysVisible() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/RotationTestBase.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/RotationTestBase.kt
index 873d607..dfc3c07 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/RotationTestBase.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/RotationTestBase.kt
@@ -18,7 +18,6 @@
import android.view.Surface
import androidx.test.filters.FlakyTest
-import org.junit.Ignore
import org.junit.Test
import org.junit.runners.Parameterized
@@ -29,7 +28,6 @@
protected val endRotation: Int
) : FlickerTestBase() {
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarWindowIsAlwaysVisible() {
checkResults {
@@ -39,7 +37,6 @@
}
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarWindowIsAlwaysVisible() {
checkResults {
@@ -86,7 +83,6 @@
}
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarLayerIsAlwaysVisible() {
checkResults {
@@ -96,7 +92,6 @@
}
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarLayerIsAlwaysVisible() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt
index 6946618..814cdcf 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt
@@ -22,7 +22,6 @@
import com.android.server.wm.flicker.TransitionRunner
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -49,21 +48,18 @@
.includeJankyRuns().build()
@FlakyTest(bugId = 141458352)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeLayerBecomesInvisible() {
super.checkVisibility_imeLayerBecomesInvisible()
}
@FlakyTest(bugId = 141458352)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeAppLayerIsAlwaysVisible() {
super.checkVisibility_imeAppLayerIsAlwaysVisible()
}
@FlakyTest(bugId = 141458352)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeAppWindowIsAlwaysVisible() {
super.checkVisibility_imeAppWindowIsAlwaysVisible()
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt
index a1030d8..c2025b6 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt
@@ -22,7 +22,6 @@
import com.android.server.wm.flicker.TransitionRunner
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -49,21 +48,18 @@
.includeJankyRuns().build()
@FlakyTest(bugId = 141458352)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeWindowBecomesInvisible() {
super.checkVisibility_imeWindowBecomesInvisible()
}
@FlakyTest(bugId = 141458352)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeLayerBecomesInvisible() {
super.checkVisibility_imeLayerBecomesInvisible()
}
@FlakyTest(bugId = 157449248)
- @Ignore("Waiting bug feedback")
@Test
override fun checkVisibility_imeAppWindowBecomesInvisible() {
super.checkVisibility_imeAppWindowBecomesInvisible()
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt
index 6e7c92b..b38262e 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt
@@ -16,6 +16,7 @@
package com.android.server.wm.flicker.ime
+import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import com.android.server.wm.flicker.CommonTransitions
import com.android.server.wm.flicker.LayersTraceSubject
@@ -24,7 +25,6 @@
import com.android.server.wm.flicker.WmTraceSubject
import com.android.server.wm.flicker.helpers.ImeAppHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -50,7 +50,7 @@
instrumentation, uiDevice, beginRotation)
.includeJankyRuns().build()
- @Ignore("Flaky. Pending debug")
+ @FlakyTest
@Test
open fun checkVisibility_imeLayerBecomesInvisible() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt
index ed8bd2a..ca04bab 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt
@@ -25,7 +25,6 @@
import com.android.server.wm.flicker.WmTraceSubject
import com.android.server.wm.flicker.helpers.ImeAppHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -63,7 +62,6 @@
}
@FlakyTest(bugId = 153739621)
- @Ignore
@Test
open fun checkVisibility_imeLayerBecomesInvisible() {
checkResults {
@@ -77,7 +75,6 @@
}
@FlakyTest(bugId = 153739621)
- @Ignore
@Test
fun checkVisibility_imeAppLayerBecomesInvisible() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt
index 943a525..88b8854 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt
@@ -25,7 +25,6 @@
import com.android.server.wm.flicker.TransitionRunner
import com.android.server.wm.flicker.WmTraceSubject
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -63,7 +62,6 @@
}
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkZOrder_appWindowReplacesLauncherAsTopWindow() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt
index 7964d94..f0bc3f0 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt
@@ -25,7 +25,6 @@
import com.android.server.wm.flicker.TransitionRunner
import com.android.server.wm.flicker.WmTraceSubject
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -63,7 +62,6 @@
}
@FlakyTest(bugId = 140855415)
- @Ignore("Waiting bug feedback")
@Test
fun checkZOrder_appWindowReplacesLauncherAsTopWindow() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToAppTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToAppTest.kt
index f939a79..89ffb7a 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToAppTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToAppTest.kt
@@ -23,7 +23,6 @@
import com.android.server.wm.flicker.WmTraceSubject
import com.android.server.wm.flicker.helpers.PipAppHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -37,7 +36,6 @@
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 152738416)
-@Ignore("Waiting bug feedback")
class PipToAppTest(
beginRotationName: String,
beginRotation: Int
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToHomeTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToHomeTest.kt
index ecfcd82..8591360 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToHomeTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/pip/PipToHomeTest.kt
@@ -23,7 +23,6 @@
import com.android.server.wm.flicker.WmTraceSubject
import com.android.server.wm.flicker.helpers.PipAppHelper
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -37,7 +36,6 @@
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 152738416)
-@Ignore("Waiting bug feedback")
class PipToHomeTest(
beginRotationName: String,
beginRotation: Int
@@ -47,7 +45,6 @@
uiDevice, beginRotation)
.includeJankyRuns().build()
- @Ignore
@Test
fun checkVisibility_backgroundWindowVisibleBehindPipLayer() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
index 7a581d0..fb1cb39 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
@@ -17,6 +17,7 @@
package com.android.server.wm.flicker.rotation
import android.util.Log
+import androidx.test.filters.FlakyTest
import androidx.test.filters.LargeTest
import com.android.server.wm.flicker.CommonTransitions
import com.android.server.wm.flicker.LayersTraceSubject
@@ -25,7 +26,6 @@
import com.android.server.wm.flicker.TransitionRunner
import com.android.server.wm.flicker.WindowUtils
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -67,7 +67,7 @@
}
}
- @Ignore("Flaky. Pending debug")
+ @FlakyTest
@Test
fun checkVisibility_screenshotLayerBecomesInvisible() {
checkResults {
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt
index d53af6f..1cd1998 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt
@@ -28,7 +28,6 @@
import com.android.server.wm.flicker.WindowUtils
import com.android.server.wm.flicker.testapp.ActivityOptions
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -42,7 +41,6 @@
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 147659548)
-@Ignore("Waiting bug feedback")
class SeamlessAppRotationTest(
private val intent: Intent,
beginRotationName: String,
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/splitscreen/ResizeSplitScreenTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/splitscreen/ResizeSplitScreenTest.kt
index b6cce26..6b597e5 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/splitscreen/ResizeSplitScreenTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/splitscreen/ResizeSplitScreenTest.kt
@@ -38,7 +38,6 @@
import com.google.common.truth.Truth
import org.junit.AfterClass
import org.junit.FixMethodOrder
-import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -53,7 +52,6 @@
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 159096424)
-@Ignore("Waiting bug feedback")
class ResizeSplitScreenTest : FlickerTestBase() {
init {
testApp = StandardAppHelper(instrumentation,
@@ -97,7 +95,7 @@
}
@Test
- @Ignore("Waiting feedback")
+ @FlakyTest
fun checkPosition_appsStartingBounds() {
val displayBounds = WindowUtils.getDisplayBounds()
checkResults { result: TransitionResult ->
@@ -122,7 +120,7 @@
}
@Test
- @Ignore("Waiting feedback")
+ @FlakyTest
fun checkPosition_appsEndingBounds() {
val displayBounds = WindowUtils.getDisplayBounds()
checkResults { result: TransitionResult ->
@@ -166,7 +164,6 @@
@Test
@FlakyTest(bugId = 156223549)
- @Ignore("Waiting bug feedback")
fun checkVisibility_topAppWindowIsAlwaysVisible() {
checkResults {
WmTraceSubject.assertThat(it)
@@ -177,7 +174,6 @@
@Test
@FlakyTest(bugId = 156223549)
- @Ignore("Waiting bug feedback")
fun checkVisibility_bottomAppWindowIsAlwaysVisible() {
checkResults {
WmTraceSubject.assertThat(it)