mirror of https://github.com/grpc/grpc-java.git
interop-testing: set the right classpath for startscripts
Currently the classpath for all startscripts in interop-testing includes alpnagent and grpc-xds, even if a lot of startscripts don't need them. Made a change to only include alpnagent or grpc-xds when a startscript really needs it.
This commit is contained in:
parent
ef44795594
commit
b348479ac8
|
|
@ -11,6 +11,7 @@ startScripts.enabled = false
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
alpnagent
|
alpnagent
|
||||||
|
xdsRuntime
|
||||||
}
|
}
|
||||||
|
|
||||||
evaluationDependsOn(project(':grpc-context').path)
|
evaluationDependsOn(project(':grpc-context').path)
|
||||||
|
|
@ -32,6 +33,7 @@ dependencies {
|
||||||
runtime libraries.opencensus_impl,
|
runtime libraries.opencensus_impl,
|
||||||
libraries.netty_tcnative,
|
libraries.netty_tcnative,
|
||||||
project(':grpc-grpclb')
|
project(':grpc-grpclb')
|
||||||
|
xdsRuntime project(path: ':grpc-xds', configuration: 'shadow')
|
||||||
testCompile project(':grpc-context').sourceSets.test.output,
|
testCompile project(':grpc-context').sourceSets.test.output,
|
||||||
libraries.mockito
|
libraries.mockito
|
||||||
alpnagent libraries.jetty_alpn_agent
|
alpnagent libraries.jetty_alpn_agent
|
||||||
|
|
@ -61,8 +63,7 @@ task test_client(type: CreateStartScripts) {
|
||||||
"-javaagent:JAVAAGENT_APP_HOME" + configurations.alpnagent.singleFile.name
|
"-javaagent:JAVAAGENT_APP_HOME" + configurations.alpnagent.singleFile.name
|
||||||
]
|
]
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
dependencies { runtime configurations.alpnagent }
|
|
||||||
doLast {
|
doLast {
|
||||||
unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/')
|
unixScript.text = unixScript.text.replace('JAVAAGENT_APP_HOME', '\$APP_HOME/lib/')
|
||||||
windowsScript.text = windowsScript.text.replace('JAVAAGENT_APP_HOME', '%APP_HOME%\\lib\\')
|
windowsScript.text = windowsScript.text.replace('JAVAAGENT_APP_HOME', '%APP_HOME%\\lib\\')
|
||||||
|
|
@ -73,21 +74,21 @@ task test_server(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.TestServiceServer"
|
mainClassName = "io.grpc.testing.integration.TestServiceServer"
|
||||||
applicationName = "test-server"
|
applicationName = "test-server"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task reconnect_test_client(type: CreateStartScripts) {
|
task reconnect_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
|
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
|
||||||
applicationName = "reconnect-test-client"
|
applicationName = "reconnect-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task stresstest_client(type: CreateStartScripts) {
|
task stresstest_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.StressTestClient"
|
mainClassName = "io.grpc.testing.integration.StressTestClient"
|
||||||
applicationName = "stresstest-client"
|
applicationName = "stresstest-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-verbose:gc",
|
"-verbose:gc",
|
||||||
"-XX:+PrintFlagsFinal"
|
"-XX:+PrintFlagsFinal"
|
||||||
|
|
@ -98,14 +99,14 @@ task http2_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.Http2Client"
|
mainClassName = "io.grpc.testing.integration.Http2Client"
|
||||||
applicationName = "http2-client"
|
applicationName = "http2-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
|
mainClassName = "io.grpc.testing.integration.GrpclbLongLivedAffinityTestClient"
|
||||||
applicationName = "grpclb-long-lived-affinity-test-client"
|
applicationName = "grpclb-long-lived-affinity-test-client"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
defaultJvmOpts = [
|
defaultJvmOpts = [
|
||||||
"-Dio.grpc.internal.DnsNameResolverProvider.enable_grpclb=true",
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_grpclb=true",
|
||||||
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
"-Dio.grpc.internal.DnsNameResolverProvider.enable_service_config=true"
|
||||||
|
|
@ -115,18 +116,15 @@ task grpclb_long_lived_affinity_test_client(type: CreateStartScripts) {
|
||||||
task xds_test_client(type: CreateStartScripts) {
|
task xds_test_client(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.XdsTestClient"
|
mainClassName = "io.grpc.testing.integration.XdsTestClient"
|
||||||
applicationName = "xds-test-client"
|
applicationName = "xds-test-client"
|
||||||
dependencies {
|
|
||||||
runtime project(path: ':grpc-xds', configuration: 'shadow')
|
|
||||||
}
|
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = startScripts.classpath
|
classpath = startScripts.classpath + configurations.xdsRuntime
|
||||||
}
|
}
|
||||||
|
|
||||||
task xds_test_server(type: CreateStartScripts) {
|
task xds_test_server(type: CreateStartScripts) {
|
||||||
mainClassName = "io.grpc.testing.integration.XdsTestServer"
|
mainClassName = "io.grpc.testing.integration.XdsTestServer"
|
||||||
applicationName = "xds-test-server"
|
applicationName = "xds-test-server"
|
||||||
outputDir = new File(project.buildDir, 'tmp')
|
outputDir = new File(project.buildDir, 'tmp')
|
||||||
classpath = jar.outputs.files + configurations.runtime
|
classpath = startScripts.classpath
|
||||||
}
|
}
|
||||||
|
|
||||||
applicationDistribution.into("bin") {
|
applicationDistribution.into("bin") {
|
||||||
|
|
@ -141,6 +139,11 @@ applicationDistribution.into("bin") {
|
||||||
fileMode = 0755
|
fileMode = 0755
|
||||||
}
|
}
|
||||||
|
|
||||||
|
applicationDistribution.into("lib") {
|
||||||
|
from(configurations.alpnagent)
|
||||||
|
from(configurations.xdsRuntime)
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue