mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
Rename test class name
This commit is contained in:
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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()
|
||||
}
|
||||
+2
-2
@@ -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
|
||||
+1
-1
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user