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

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

Merge "Clear the cache directory at the end of each test class" into main

parents 21a1b5c5 bee820b9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ import android.app.Instrumentation
import android.tools.flicker.junit.FlickerBuilderProvider
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.rules.ClearAppCacheRule
import androidx.test.platform.app.InstrumentationRegistry
import com.android.launcher3.tapl.LauncherInstrumentation
import org.junit.ClassRule

abstract class BaseBenchmarkTest
@JvmOverloads
@@ -44,4 +46,8 @@ constructor(
            transition()
        }
    }

    companion object {
        @ClassRule @JvmField val clearCache = ClearAppCacheRule()
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.platform.test.annotations.Presubmit
import android.tools.flicker.junit.FlickerBuilderProvider
import android.tools.flicker.legacy.FlickerBuilder
import android.tools.flicker.legacy.LegacyFlickerTest
import android.tools.flicker.rules.ClearAppCacheRule
import android.tools.traces.executeShellCommand
import android.util.Log
import androidx.test.platform.app.InstrumentationRegistry
@@ -29,6 +30,7 @@ import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.wm.shell.Flags
import org.junit.Assume
import org.junit.AssumptionViolatedException
import org.junit.ClassRule
import org.junit.Test

/**
@@ -223,4 +225,8 @@ constructor(
            Log.e(logTag, "Assumption violation on CUJ complete", e)
        }
    }

    companion object {
        @ClassRule @JvmField val clearCache = ClearAppCacheRule()
    }
}