mirror of
https://github.com/corda/corda.git
synced 2025-01-27 06:39:38 +00:00
Redirect search_paths into a file since it so long and doesn't work on the command line in Windows.
This commit is contained in:
parent
5c64917f18
commit
a84e9fdb2b
@ -35,8 +35,10 @@ dependencies {
|
||||
task(runServer, dependsOn: 'classes', type: JavaExec) {
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
main = 'com.r3.corda.jmeter.Launcher'
|
||||
systemProperty "search_paths", project(':tools:jmeter').configurations.runtime.files.join(";")
|
||||
systemProperty "java.rmi.server.hostname", "0.0.0.0"
|
||||
def file = new File("$rootDir/build/search_paths.txt")
|
||||
file.createNewFile()
|
||||
file.text = "${project(':tools:jmeter').configurations.runtime.files.join(";")}"
|
||||
systemProperty "search_paths_file", file.toString() systemProperty "java.rmi.server.hostname", "0.0.0.0"
|
||||
systemProperty "jmeter.home", sourceSets.main.resources.getSrcDirs().first().getPath()
|
||||
// If you want to debug: jvmArgs += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
|
||||
args+= [ "-p", sourceSets.main.resources.getSrcDirs().first().getPath()+"/jmeter.properties",
|
||||
@ -61,7 +63,10 @@ task(runSsh, dependsOn: 'classes', type: JavaExec) {
|
||||
// e.g. ./gradlew tools:jmeter:run -PjmeterHosts="['perf-notary.corda.r3cev.com', 'perf-node-1.corda.r3cev.com']"
|
||||
// Each host is paired with local host ports listed in remote_hosts of jmeter.properties
|
||||
run {
|
||||
systemProperty "search_paths", project(':tools:jmeter').configurations.runtime.files.join(";")
|
||||
def file = new File("$rootDir/build/search_paths.txt")
|
||||
file.createNewFile()
|
||||
file.text = "${project(':tools:jmeter').configurations.runtime.files.join(";")}"
|
||||
systemProperty "search_paths_file", file.toString()
|
||||
systemProperty "java.rmi.server.hostname", "localhost"
|
||||
systemProperty "jmeter.home", sourceSets.main.resources.getSrcDirs().first().getPath()
|
||||
// If you want to debug: jvmArgs += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
|
||||
|
@ -50,6 +50,9 @@ class Launcher {
|
||||
}
|
||||
jmeter.start(arrayOf("-s", "-p", (capsuleDirPath / "jmeter.properties").toString()) + extraArgs + args)
|
||||
} else {
|
||||
val searchPath = Files.readAllLines(Paths.get(System.getProperty("search_paths_file"))).first()
|
||||
logger.info("search_paths = $searchPath")
|
||||
System.setProperty("search_paths", searchPath)
|
||||
jmeter.start(maybeOpenSshTunnels(args))
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user