Rename test class name

This commit is contained in:
topjohnwu
2026-10-07 05:05:38 +00:00
parent 0265698710
commit 33c1f83562
5 changed files with 10 additions and 10 deletions
@@ -33,12 +33,12 @@ import java.io.PrintStream
@Keep
@RunWith(AndroidJUnit4::class)
class Environment : BaseTest {
class Environment : TestCommon {
companion object {
@BeforeClass
@JvmStatic
fun before() = BaseTest.prerequisite()
fun before() = TestCommon.prerequisite()
// Whether we're running with live setup (patches through avd_setup.sh)
fun isLiveSetup(): Boolean {
@@ -31,7 +31,7 @@ import java.util.regex.Pattern
@Keep
@RunWith(AndroidJUnit4::class)
class AdditionalTest : BaseTest {
class IntegrationTest : TestCommon {
companion object {
private const val SHELL_PKG = "com.android.shell"
@@ -43,7 +43,7 @@ class AdditionalTest : BaseTest {
@BeforeClass
@JvmStatic
fun before() {
BaseTest.prerequisite()
TestCommon.prerequisite()
runBlocking {
modules = LocalModule.installed()
}
@@ -15,12 +15,12 @@ import org.junit.runner.RunWith
@Keep
@RunWith(AndroidJUnit4::class)
class MagiskAppTest : BaseTest {
class SmokeTest : TestCommon {
companion object {
@BeforeClass
@JvmStatic
fun before() = BaseTest.prerequisite()
fun before() = TestCommon.prerequisite()
}
@Test
@@ -9,7 +9,7 @@ import com.topjohnwu.magisk.core.utils.RootUtils
import com.topjohnwu.superuser.Shell
import org.junit.Assert.assertTrue
interface BaseTest {
interface TestCommon {
val instrumentation: Instrumentation
get() = InstrumentationRegistry.getInstrumentation()
val appContext: Context get() = instrumentation.targetContext
+3 -3
View File
@@ -86,17 +86,17 @@ run_tests() {
local stub="repackaged.$pkg/$pkg.AppTestRunner"
# Run app tests
am_instrument '.MagiskAppTest,.AdditionalTest' $app
am_instrument '.SmokeTest,.IntegrationTest' $app
# Test app hiding
am_instrument '.AppMigrationTest#testAppHide' $self
# Make sure it still works
am_instrument '.MagiskAppTest' $stub
am_instrument '.SmokeTest' $stub
# Test app restore
am_instrument '.AppMigrationTest#testAppRestore' $self
# Make sure it still works
am_instrument '.MagiskAppTest' $app
am_instrument '.SmokeTest' $app
}