mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Launch the test JVM with "-ea".
Fixes https://github.com/cbeust/kobalt/issues/303.
This commit is contained in:
parent
079890b2e7
commit
9fb3eb87a2
2 changed files with 5 additions and 4 deletions
|
@ -146,6 +146,7 @@ abstract class GenericTestRunner: ITestRunnerContributor {
|
||||||
// Default JVM args
|
// Default JVM args
|
||||||
val jvmFlags = arrayListOf<String>().apply {
|
val jvmFlags = arrayListOf<String>().apply {
|
||||||
addAll(testConfig.jvmArgs)
|
addAll(testConfig.jvmArgs)
|
||||||
|
add("-ea")
|
||||||
add("-classpath")
|
add("-classpath")
|
||||||
add(classpath.map { it.jarFile.get().absolutePath }.joinToString(File.pathSeparator))
|
add(classpath.map { it.jarFile.get().absolutePath }.joinToString(File.pathSeparator))
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,19 +50,19 @@ class DependencyTest @Inject constructor(val context: KobaltContext) {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noContributorsNoInterceptors() {
|
fun noContributorsNoInterceptors() {
|
||||||
runTest(BasePluginInfo(), listOf("-classpath", A_JAR))
|
runTest(BasePluginInfo(), listOf("-ea", "-classpath", A_JAR))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun contributorOnly() {
|
fun contributorOnly() {
|
||||||
runTest(BasePluginInfo().apply { testJvmFlagContributors.add(contributor) },
|
runTest(BasePluginInfo().apply { testJvmFlagContributors.add(contributor) },
|
||||||
listOf("-classpath", A_JAR, "-agent", "foo"))
|
listOf("-ea", "-classpath", A_JAR, "-agent", "foo"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun interceptorOnly() {
|
fun interceptorOnly() {
|
||||||
runTest(BasePluginInfo().apply { testJvmFlagInterceptors.add(interceptor) },
|
runTest(BasePluginInfo().apply { testJvmFlagInterceptors.add(interceptor) },
|
||||||
listOf("-classpath", B_JAR))
|
listOf("-ea", "-classpath", B_JAR))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -71,7 +71,7 @@ class DependencyTest @Inject constructor(val context: KobaltContext) {
|
||||||
testJvmFlagContributors.add(contributor)
|
testJvmFlagContributors.add(contributor)
|
||||||
testJvmFlagInterceptors.add(interceptor)
|
testJvmFlagInterceptors.add(interceptor)
|
||||||
},
|
},
|
||||||
listOf("-classpath", B_JAR, "-agent", "foo"))
|
listOf("-ea", "-classpath", B_JAR, "-agent", "foo"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue