Skip to content

Commit

Permalink
Extracted OpenSSL test into separate task to eliminate mess with syst…
Browse files Browse the repository at this point in the history
…em properties

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Dec 13, 2022
1 parent 56115da commit a231543
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ test {
include '**/*.class'
filter {
excludeTestsMatching "org.opensearch.security.sanity.tests.*"
excludeTestsMatching "org.opensearch.security.ssl.OpenSSL*"
}
maxParallelForks = 8
jvmArgs += "-Xmx3072m"
Expand Down Expand Up @@ -149,13 +150,37 @@ test {
}
}

//add new task that runs OpenSSL tests
task opensslTest(type: Test) {
include '**/OpenSSL*.class'
retry {
failOnPassedAfterRetry = false
maxRetries = 5
}
jacoco {
excludes = [
"com.sun.jndi.dns.*",
"com.sun.security.sasl.gsskerb.*",
"java.sql.*",
"javax.script.*",
"org.jcp.xml.dsig.internal.dom.*",
"sun.nio.cs.ext.*",
"sun.security.ec.*",
"sun.security.jgss.*",
"sun.security.pkcs11.*",
"sun.security.smartcardio.*",
"sun.util.resources.provider.*"
]
}
}

task copyExtraTestResources(dependsOn: testClasses) {
copy {
from 'src/test/resources'
into 'build/testrun/test/src/test/resources'
}
}
tasks.test.dependsOn(copyExtraTestResources)
tasks.test.dependsOn(copyExtraTestResources, opensslTest)

jacoco {
reportsDirectory = file("$buildDir/reports/jacoco")
Expand Down

0 comments on commit a231543

Please sign in to comment.