blob: edb368c5e80217842c698cef8ba51c94dbb26789 [file] [log] [blame]
description = 'Conscrypt: OpenJDK Integration Tests'
evaluationDependsOn(':conscrypt-openjdk')
def preferredSourceSet = project(':conscrypt-openjdk').preferredSourceSet
def preferredNativeFileDir = project(':conscrypt-openjdk').preferredNativeFileDir
sourceSets {
main {
resources {
// This shouldn't be needed but seems to help IntelliJ locate the native artifact.
srcDirs += preferredNativeFileDir
}
}
}
dependencies {
implementation project(':conscrypt-openjdk')
// Add the preferred native openjdk configuration for this platform.
implementation project(':conscrypt-openjdk').sourceSets["$preferredSourceSet"].output
testImplementation project(':conscrypt-constants'),
project(':conscrypt-testing')
}
// Check which version
def javaError = new ByteArrayOutputStream()
exec {
executable test.executable
args = ['-version']
ignoreExitValue true
errorOutput = javaError
}
def suiteClass = (javaError.toString() =~ /"1[.]6[.].*"/) ?
"org/conscrypt/ConscryptJava6Suite.class" : "org/conscrypt/ConscryptSuite.class";
test {
include suiteClass
}
task testEngineSocket(type: Test, dependsOn: test) {
jvmArgs "-Dorg.conscrypt.useEngineSocketByDefault=true"
include suiteClass
}
check.dependsOn testEngineSocket
// Don't include this artifact in the distribution.
tasks.install.enabled = false
tasks.uploadArchives.enabled = false;