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
This commit is contained in:
Nataniel Borges
2020-07-17 16:18:28 +02:00
parent 3bc59bb03b
commit f4cf0fb915
16 changed files with 12 additions and 44 deletions

View File

@@ -28,6 +28,7 @@ android_test {
"flickerlib",
"truth-prebuilt",
"app-helpers-core",
"launcher-helper-lib",
"launcher-aosp-tapl"
],
}

View File

@@ -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" />

View File

@@ -20,22 +20,24 @@ import android.platform.helpers.IAppHelper
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 {

View File

@@ -18,7 +18,6 @@ package com.android.server.wm.flicker
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 @@ abstract class NonRotationTestBase(
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 @@ abstract class NonRotationTestBase(
}
@FlakyTest(bugId = 141361128)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarLayerIsAlwaysVisible() {
checkResults {
@@ -48,7 +45,6 @@ abstract class NonRotationTestBase(
}
@FlakyTest(bugId = 141361128)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarLayerIsAlwaysVisible() {
checkResults {

View File

@@ -18,7 +18,6 @@ package com.android.server.wm.flicker
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 @@ abstract class RotationTestBase(
protected val endRotation: Int
) : FlickerTestBase() {
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarWindowIsAlwaysVisible() {
checkResults {
@@ -39,7 +37,6 @@ abstract class RotationTestBase(
}
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarWindowIsAlwaysVisible() {
checkResults {
@@ -86,7 +83,6 @@ abstract class RotationTestBase(
}
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_navBarLayerIsAlwaysVisible() {
checkResults {
@@ -96,7 +92,6 @@ abstract class RotationTestBase(
}
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkVisibility_statusBarLayerIsAlwaysVisible() {
checkResults {

View File

@@ -22,7 +22,6 @@ import com.android.server.wm.flicker.CommonTransitions
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 @@ class CloseImeAutoOpenWindowToAppTest(
.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()

View File

@@ -22,7 +22,6 @@ import com.android.server.wm.flicker.CommonTransitions
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 @@ class CloseImeAutoOpenWindowToHomeTest(
.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()

View File

@@ -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.TransitionRunner
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 @@ open class CloseImeWindowToAppTest(
instrumentation, uiDevice, beginRotation)
.includeJankyRuns().build()
@Ignore("Flaky. Pending debug")
@FlakyTest
@Test
open fun checkVisibility_imeLayerBecomesInvisible() {
checkResults {

View File

@@ -25,7 +25,6 @@ import com.android.server.wm.flicker.TransitionRunner
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 @@ open class CloseImeWindowToHomeTest(
}
@FlakyTest(bugId = 153739621)
@Ignore
@Test
open fun checkVisibility_imeLayerBecomesInvisible() {
checkResults {
@@ -77,7 +75,6 @@ open class CloseImeWindowToHomeTest(
}
@FlakyTest(bugId = 153739621)
@Ignore
@Test
fun checkVisibility_imeAppLayerBecomesInvisible() {
checkResults {

View File

@@ -25,7 +25,6 @@ import com.android.server.wm.flicker.StandardAppHelper
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 @@ class OpenAppColdTest(
}
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkZOrder_appWindowReplacesLauncherAsTopWindow() {
checkResults {

View File

@@ -25,7 +25,6 @@ import com.android.server.wm.flicker.StandardAppHelper
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 @@ class OpenAppWarmTest(
}
@FlakyTest(bugId = 140855415)
@Ignore("Waiting bug feedback")
@Test
fun checkZOrder_appWindowReplacesLauncherAsTopWindow() {
checkResults {

View File

@@ -23,7 +23,6 @@ import com.android.server.wm.flicker.TransitionRunner
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 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 152738416)
@Ignore("Waiting bug feedback")
class PipToAppTest(
beginRotationName: String,
beginRotation: Int

View File

@@ -23,7 +23,6 @@ import com.android.server.wm.flicker.TransitionRunner
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 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 152738416)
@Ignore("Waiting bug feedback")
class PipToHomeTest(
beginRotationName: String,
beginRotation: Int
@@ -47,7 +45,6 @@ class PipToHomeTest(
uiDevice, beginRotation)
.includeJankyRuns().build()
@Ignore
@Test
fun checkVisibility_backgroundWindowVisibleBehindPipLayer() {
checkResults {

View File

@@ -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.StandardAppHelper
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 @@ class ChangeAppRotationTest(
}
}
@Ignore("Flaky. Pending debug")
@FlakyTest
@Test
fun checkVisibility_screenshotLayerBecomesInvisible() {
checkResults {

View File

@@ -28,7 +28,6 @@ import com.android.server.wm.flicker.TransitionRunner
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 @@ import org.junit.runners.Parameterized
@RunWith(Parameterized::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@FlakyTest(bugId = 147659548)
@Ignore("Waiting bug feedback")
class SeamlessAppRotationTest(
private val intent: Intent,
beginRotationName: String,

View File

@@ -38,7 +38,6 @@ import com.android.server.wm.flicker.helpers.ImeAppHelper
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 @@ import org.junit.runners.MethodSorters
@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 @@ class ResizeSplitScreenTest : FlickerTestBase() {
}
@Test
@Ignore("Waiting feedback")
@FlakyTest
fun checkPosition_appsStartingBounds() {
val displayBounds = WindowUtils.getDisplayBounds()
checkResults { result: TransitionResult ->
@@ -122,7 +120,7 @@ class ResizeSplitScreenTest : FlickerTestBase() {
}
@Test
@Ignore("Waiting feedback")
@FlakyTest
fun checkPosition_appsEndingBounds() {
val displayBounds = WindowUtils.getDisplayBounds()
checkResults { result: TransitionResult ->
@@ -166,7 +164,6 @@ class ResizeSplitScreenTest : FlickerTestBase() {
@Test
@FlakyTest(bugId = 156223549)
@Ignore("Waiting bug feedback")
fun checkVisibility_topAppWindowIsAlwaysVisible() {
checkResults {
WmTraceSubject.assertThat(it)
@@ -177,7 +174,6 @@ class ResizeSplitScreenTest : FlickerTestBase() {
@Test
@FlakyTest(bugId = 156223549)
@Ignore("Waiting bug feedback")
fun checkVisibility_bottomAppWindowIsAlwaysVisible() {
checkResults {
WmTraceSubject.assertThat(it)