Add support for forcing JDK to run tests on

This commit is contained in:
Nikolay Martynov 2019-06-14 16:22:05 -04:00
parent e8246f6b97
commit 7fc5132ea6
1 changed files with 5 additions and 1 deletions

View File

@ -219,6 +219,10 @@ def isJavaVersionAllowed(JavaVersion version) {
return true return true
} }
def isJdkForced(String javaName) {
return (project.hasProperty('forceJdk') && project.getProperty('forceJdk').contains(javaName))
}
// JVM names we would like to run complete test suite on // JVM names we would like to run complete test suite on
// Note: complete test suite is always run on JVM used for compilation // Note: complete test suite is always run on JVM used for compilation
// Note2: apparently there is no way to have a 'global' variable, so instead we have per project // Note2: apparently there is no way to have a 'global' variable, so instead we have per project
@ -290,7 +294,7 @@ for (def env : System.getenv().entrySet()) {
jvmArgs '-XX:CompileCommand=exclude,net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType' jvmArgs '-XX:CompileCommand=exclude,net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType'
} }
onlyIf { isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName) } onlyIf { (isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName)) || isJdkForced(javaName) }
if (applyCodeCoverage) { if (applyCodeCoverage) {
jacoco { jacoco {
// Disable jacoco for additional JVM tests to speed things up a bit // Disable jacoco for additional JVM tests to speed things up a bit