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

Commit 2944e9c2 authored by Vania Desmonda's avatar Vania Desmonda
Browse files

Move `ScreenRecordRule` to be a class rule.

This allows the screen to be recorded only once throughout the class, instead for each individual test to prevent a lot of mp4s being generated for each assertion and rotation permutations

Fixes: 421100393
Test: presubmits
Flag: EXEMPT test infra
Change-Id: I2c2aaba66e8f3987720d0e2e7203618a99d1b367
parent 8062b683
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.tools.flicker.rules.ChangeDisplayOrientationRule
import org.junit.Assume
import org.junit.Before
import org.junit.Test
import org.junit.ClassRule
import org.junit.Rule
import org.junit.rules.TestName
import com.android.server.wm.flicker.entireScreenCovered
@@ -42,8 +43,8 @@ abstract class DesktopModeBaseTest(flicker: LegacyFlickerTest) : BaseBenchmarkTe
    @get:Rule
    val testName = TestName()

    @get:Rule
    val screenRecordRule = ScreenRecordRule(keepTestLevelRecordingOnSuccess = false)
    @get:ClassRule
    val screenRecordRule = ScreenRecordRule()

    // Override this set with the test method names that you want to exclude from the test
    open val excludedTests: Set<String> = emptySet()