mirror of
https://github.com/corda/corda.git
synced 2025-05-31 22:50:53 +00:00
Set java.io.tmpdir to Gradle's build directory for unit and integration tests. (#638)
This commit is contained in:
parent
25dbac0f07
commit
0ed009dfa0
@ -123,6 +123,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test) {
|
||||||
|
// Prevent the project from creating temporary files outside of the build directory.
|
||||||
|
systemProperties['java.io.tmpdir'] = buildDir
|
||||||
|
}
|
||||||
|
|
||||||
group 'net.corda'
|
group 'net.corda'
|
||||||
version "$corda_release_version"
|
version "$corda_release_version"
|
||||||
|
|
||||||
|
@ -589,7 +589,8 @@ class DriverDSL(
|
|||||||
|
|
||||||
val systemProperties = overriddenSystemProperties + mapOf(
|
val systemProperties = overriddenSystemProperties + mapOf(
|
||||||
"name" to nodeConf.myLegalName,
|
"name" to nodeConf.myLegalName,
|
||||||
"visualvm.display.name" to "corda-${nodeConf.myLegalName}"
|
"visualvm.display.name" to "corda-${nodeConf.myLegalName}",
|
||||||
|
"java.io.tmpdir" to System.getProperty("java.io.tmpdir") // Inherit from parent process
|
||||||
)
|
)
|
||||||
val extraJvmArguments = systemProperties.map { "-D${it.key}=${it.value}" } +
|
val extraJvmArguments = systemProperties.map { "-D${it.key}=${it.value}" } +
|
||||||
"-javaagent:$quasarJarPath"
|
"-javaagent:$quasarJarPath"
|
||||||
@ -621,7 +622,10 @@ class DriverDSL(
|
|||||||
className = className, // cannot directly get class for this, so just use string
|
className = className, // cannot directly get class for this, so just use string
|
||||||
arguments = listOf("--base-directory", handle.configuration.baseDirectory.toString()),
|
arguments = listOf("--base-directory", handle.configuration.baseDirectory.toString()),
|
||||||
jdwpPort = debugPort,
|
jdwpPort = debugPort,
|
||||||
extraJvmArguments = listOf("-Dname=node-${handle.configuration.p2pAddress}-webserver"),
|
extraJvmArguments = listOf(
|
||||||
|
"-Dname=node-${handle.configuration.p2pAddress}-webserver",
|
||||||
|
"-Djava.io.tmpdir=${System.getProperty("java.io.tmpdir")}" // Inherit from parent process
|
||||||
|
),
|
||||||
errorLogPath = Paths.get("error.$className.log")
|
errorLogPath = Paths.get("error.$className.log")
|
||||||
)
|
)
|
||||||
}.flatMap { process -> addressMustBeBound(executorService, handle.webAddress, process).map { process } }
|
}.flatMap { process -> addressMustBeBound(executorService, handle.webAddress, process).map { process } }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user