Don't run dx test in emulator
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
ext {
|
||||
isD8Enabled = project.findProperty('android.enableD8').toBoolean()
|
||||
}
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
@@ -60,11 +57,9 @@ android {
|
||||
resultsDir = "build/test/results"
|
||||
}
|
||||
|
||||
if (isD8Enabled) {
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
flavorDimensions "box"
|
||||
@@ -86,15 +81,12 @@ android {
|
||||
dimension "box"
|
||||
}
|
||||
|
||||
jvm80 {
|
||||
dimension "box"
|
||||
}
|
||||
|
||||
if (isD8Enabled) {
|
||||
jvm80 {
|
||||
dimension "box"
|
||||
}
|
||||
|
||||
reflectjvm80 {
|
||||
dimension "box"
|
||||
}
|
||||
reflectjvm80 {
|
||||
dimension "box"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#don't try to download android specific tools within gradle: licence acceptance will be required
|
||||
android.builder.sdkDownload=false
|
||||
android.enableD8=true
|
||||
android.builder.sdkDownload=false
|
||||
-20
@@ -55,16 +55,6 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
|
||||
runTestsOnEmulator(gradleRunner, TestSuite("D8")).apply {
|
||||
rootSuite.addTest(this)
|
||||
}
|
||||
|
||||
renameFlavorFolder()
|
||||
enableD8(false)
|
||||
runTestsOnEmulator(gradleRunner, TestSuite("DX")).apply {
|
||||
(0 until this.countTestCases()).forEach {
|
||||
val testCase = testAt(it) as TestCase
|
||||
testCase.name += "_DX"
|
||||
}
|
||||
rootSuite.addTest(this)
|
||||
}
|
||||
} catch (e: RuntimeException) {
|
||||
e.printStackTrace()
|
||||
throw e
|
||||
@@ -81,16 +71,6 @@ class CodegenTestsOnAndroidRunner private constructor(private val pathManager: P
|
||||
return rootSuite
|
||||
}
|
||||
|
||||
private fun enableD8(enable: Boolean) {
|
||||
val file = File(pathManager.androidTmpFolder, "gradle.properties")
|
||||
val lines = file.readLines().map {
|
||||
if (it.startsWith("android.enableD8=")) {
|
||||
"android.enableD8=$enable"
|
||||
} else it
|
||||
}
|
||||
file.writeText(lines.joinToString("\n"))
|
||||
}
|
||||
|
||||
private fun processReport(suite: TestSuite, resultOutput: String) {
|
||||
val reportFolder = File(flavorFolder())
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user