grpc-java/interop-testing/build.gradle

73 lines
2.4 KiB
Groovy

apply plugin: 'application'
description = "gRPC: Integration Testing"
startScripts.enabled = false
dependencies {
compile project(':grpc-auth'),
project(':grpc-core'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-protobuf'),
project(':grpc-stub'),
project(':grpc-testing'),
project(':grpc-testing-proto'),
libraries.junit,
libraries.mockito,
libraries.netty_tcnative,
libraries.oauth_client
}
test {
// For the automated tests, use Jetty ALPN.
jvmArgs "-javaagent:" + configurations.alpnagent.asPath
}
// For the generated scripts, use Netty tcnative (i.e. OpenSSL).
// Note that OkHttp currently only supports ALPN, so OpenSSL version >= 1.0.2 is required.
task test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.TestServiceClient"
applicationName = "test-client"
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + configurations.runtime
}
task test_server(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.TestServiceServer"
applicationName = "test-server"
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + configurations.runtime
}
task reconnect_test_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.ReconnectTestClient"
applicationName = "reconnect-test-client"
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + configurations.runtime
}
task stresstest_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.StressTestClient"
applicationName = "stresstest-client"
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + configurations.runtime
defaultJvmOpts = ["-verbose:gc", "-XX:+PrintFlagsFinal"]
}
task http2_client(type: CreateStartScripts) {
mainClassName = "io.grpc.testing.integration.Http2Client"
applicationName = "http2-client"
outputDir = new File(project.buildDir, 'tmp')
classpath = jar.outputs.files + configurations.runtime
}
applicationDistribution.into("bin") {
from(test_client)
from(test_server)
from(reconnect_test_client)
from(stresstest_client)
from(http2_client)
fileMode = 0755
}