mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-30 22:44:25 +02:00
Consolidate setup methods
This commit is contained in:
parent
b73d4a7022
commit
29043e1684
@ -42,19 +42,15 @@ class Environment : BaseTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setupMagisk() {
|
fun setupEnvironment() {
|
||||||
runBlocking {
|
runBlocking {
|
||||||
assertTrue(
|
assertTrue(
|
||||||
"Magisk setup failed",
|
"Magisk setup failed",
|
||||||
MagiskInstaller.Emulator(TimberLog, TimberLog).exec()
|
MagiskInstaller.Emulator(TimberLog, TimberLog).exec()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
fun setupLsposed() {
|
|
||||||
assumeTrue(lsposed())
|
|
||||||
|
|
||||||
|
if (lsposed()) {
|
||||||
val notify = object : DownloadNotifier {
|
val notify = object : DownloadNotifier {
|
||||||
override val context = appContext
|
override val context = appContext
|
||||||
override fun notifyUpdate(id: Int, editor: (Notification.Builder) -> Unit) {}
|
override fun notifyUpdate(id: Int, editor: (Notification.Builder) -> Unit) {}
|
||||||
@ -71,6 +67,7 @@ class Environment : BaseTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun setupAppHide() {
|
fun setupAppHide() {
|
||||||
|
@ -53,9 +53,7 @@ run_setup() {
|
|||||||
local app='com.topjohnwu.magisk.test/com.topjohnwu.magisk.test.AppTestRunner'
|
local app='com.topjohnwu.magisk.test/com.topjohnwu.magisk.test.AppTestRunner'
|
||||||
|
|
||||||
# Run setup through the test app
|
# Run setup through the test app
|
||||||
am_instrument '.Environment#setupMagisk' $app
|
am_instrument '.Environment#setupEnvironment' $app
|
||||||
# Install LSPosed
|
|
||||||
am_instrument '.Environment#setupLsposed' $app
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_tests() {
|
run_tests() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user