Run profiling tests on zulu8
MODIFY
dd-java-agent/agent-profiling/profiling-controller-openjdk/profiling-controller-openjdk.gradle
dd-java-agent/agent-profiling/profiling-controller-openjdk/profiling-controller-openjdk.gradle
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_11
+ // Zulu has backported profiling support
+ forceJdk = ['ZULU8']
+ // By default tests with be compiled for `minJavaVersionForTests` version,
+ // but in this case we would like to avoid this since we would like to run with ZULU8
+ skipSettingTestJavaVersion = true
}
apply from: "${rootDir}/gradle/java.gradle"
@@ -26,7 +31,6 @@ Setup here is as following:
* We compile with Java11 compiler to get JFR definitions.
* We specify source/target as Java8 to get code that is loadable on Java8 - JFR defs are Java8 compatible.
* We force IDEA to treat this as Java11 project with 'idea' plugin below.
-* We run tests only on Java11+.
*/
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

MODIFY
dd-smoke-tests/profiling-integration-tests/profiling-integration-tests.gradle
dd-smoke-tests/profiling-integration-tests/profiling-integration-tests.gradle
@@ -5,7 +5,7 @@ plugins {
ext {
minJavaVersionForTests = JavaVersion.VERSION_11
// Zulu has backported profiling support
- forceJdk = ['ZULU8', 'ZULU11', '12']
+ forceJdk = ['ZULU8']
jmcVersion = '8.0.0-SNAPSHOT'
}

MODIFY
gradle/java.gradle
gradle/java.gradle
@@ -48,6 +48,10 @@ if (project.hasProperty('minJavaVersionForTests') && project.getProperty('minJav
from sourceSets."main_$name".output
}
+ // In some cases we would like to avoid setting java version to `minJavaVersionForTests`.
+ // For example we would like to be able to run profiling tests with ZULU8, but we cannot run it with other JDK8 implementations at the moment
+ def skipSettingTestJavaVersion = project.hasProperty('skipSettingTestJavaVersion') && project.getProperty('skipSettingTestJavaVersion')
+ if (!skipSettingTestJavaVersion) {
tasks.withType(JavaCompile).configureEach {
if (it.name.toLowerCase().contains("test")) {
sourceCompatibility = version
@@ -55,6 +59,7 @@ if (project.hasProperty('minJavaVersionForTests') && project.getProperty('minJav
}
}
}
+}
java {
// See https://docs.gradle.org/current/userguide/upgrading_version_5.html, Automatic target JVM version

Run profiling tests on zulu8