Minor, refactor system properties in CodegenTestCase

This commit is contained in:
Alexander Udalov
2019-04-03 17:51:01 +02:00
parent b602c08773
commit e191eef10a
2 changed files with 17 additions and 21 deletions
@@ -6,7 +6,7 @@
package org.jetbrains.kotlin.codegen.jdk
import org.jetbrains.kotlin.codegen.*
import org.jetbrains.kotlin.codegen.CodegenTestCase.RUN_BOX_TEST_IN_SEPARATE_PROCESS_PORT
import org.jetbrains.kotlin.codegen.CodegenTestCase.BOX_IN_SEPARATE_PROCESS_PORT
import org.jetbrains.kotlin.test.RunOnlyJdk6Test
import org.jetbrains.kotlin.test.SuiteRunnerForCustomJdk
import org.junit.AfterClass
@@ -49,8 +49,7 @@ class JvmTarget6OnJvm6 : CustomJvmTargetOnJvmBaseTest() {
System.getProperty("kotlin.test.box.in.separate.process.server.classpath") ?: System.getProperty("java.class.path")
println("Server classpath: $classpath")
val port = System.getProperty(RUN_BOX_TEST_IN_SEPARATE_PROCESS_PORT)
?: error("$RUN_BOX_TEST_IN_SEPARATE_PROCESS_PORT is not specified")
val port = BOX_IN_SEPARATE_PROCESS_PORT ?: error("kotlin.test.box.in.separate.process.port is not specified")
val builder = ProcessBuilder(executable, "-cp", classpath, main, port)
builder.inheritIO()
@@ -94,4 +93,4 @@ class JvmTarget9OnJvm9 : CustomJvmTargetOnJvmBaseTest()
class JvmTarget6OnJvmLast : CustomJvmTargetOnJvmBaseTest()
@RunWith(SuiteRunnerForCustomJdk::class)
class JvmTarget8OnJvmLast : CustomJvmTargetOnJvmBaseTest()
class JvmTarget8OnJvmLast : CustomJvmTargetOnJvmBaseTest()