Run android test locally with X86 emulator
This commit is contained in:
@@ -38,5 +38,10 @@ projectTest {
|
||||
doFirst {
|
||||
environment("kotlin.tests.android.timeout", "45")
|
||||
}
|
||||
|
||||
if (project.hasProperty("teamcity") || project.hasProperty("kotlin.test.android.teamcity")) {
|
||||
systemProperty("kotlin.test.android.teamcity", true)
|
||||
}
|
||||
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
+6
-1
@@ -33,11 +33,16 @@ import javax.xml.parsers.ParserConfigurationException
|
||||
|
||||
class CodegenTestsOnAndroidRunner private constructor(private val pathManager: PathManager) {
|
||||
|
||||
private val isTeamcity = System.getProperty("kotlin.test.android.teamcity") != null || System.getenv("TEAMCITY_VERSION") != null
|
||||
|
||||
private fun runTestsInEmulator(): TestSuite {
|
||||
val rootSuite = TestSuite("Root")
|
||||
|
||||
downloadDependencies()
|
||||
val emulator = Emulator(pathManager, Emulator.ARM)
|
||||
|
||||
val emulatorType = if (isTeamcity) Emulator.ARM else Emulator.X86
|
||||
println("Using $emulatorType emulator!")
|
||||
val emulator = Emulator(pathManager, emulatorType)
|
||||
emulator.createEmulator()
|
||||
|
||||
val gradleRunner = GradleRunner(pathManager)
|
||||
|
||||
Reference in New Issue
Block a user