Merge pull request #480 from DataDog/tyler/java-11
Run tests on Java 11
This commit is contained in:
commit
854866df57
|
@ -77,6 +77,10 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install $INSTALL_ZULU
|
sudo apt-get install $INSTALL_ZULU
|
||||||
fi
|
fi
|
||||||
|
if [ "${INSTALL_OPENJDK}" != "" ]; then
|
||||||
|
wget -O ~/openjdk.tar.gz $INSTALL_OPENJDK
|
||||||
|
sudo tar xvf ~/openjdk.tar.gz -C /usr/lib/jvm/
|
||||||
|
fi
|
||||||
|
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
@ -131,6 +135,13 @@ jobs:
|
||||||
- TEST_TASK: testJava10 latestDepTestJava10
|
- TEST_TASK: testJava10 latestDepTestJava10
|
||||||
- INSTALL_ZULU: zulu-10
|
- INSTALL_ZULU: zulu-10
|
||||||
|
|
||||||
|
test_11:
|
||||||
|
<<: *default_test_job
|
||||||
|
environment:
|
||||||
|
- JAVA11_HOME: /usr/lib/jvm/jdk-11
|
||||||
|
- TEST_TASK: testJava11 latestDepTestJava11
|
||||||
|
- INSTALL_OPENJDK: https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz
|
||||||
|
|
||||||
agent_integration_tests:
|
agent_integration_tests:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
docker:
|
docker:
|
||||||
|
@ -255,6 +266,12 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
- test_11:
|
||||||
|
requires:
|
||||||
|
- build
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /.*/
|
||||||
|
|
||||||
- agent_integration_tests:
|
- agent_integration_tests:
|
||||||
requires:
|
requires:
|
||||||
|
@ -276,6 +293,7 @@ workflows:
|
||||||
- test_8
|
- test_8
|
||||||
- test_9
|
- test_9
|
||||||
- test_10
|
- test_10
|
||||||
|
- test_11
|
||||||
- agent_integration_tests
|
- agent_integration_tests
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
|
@ -289,6 +307,7 @@ workflows:
|
||||||
- test_8
|
- test_8
|
||||||
- test_9
|
- test_9
|
||||||
- test_10
|
- test_10
|
||||||
|
- test_11
|
||||||
- agent_integration_tests
|
- agent_integration_tests
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
apply plugin: "jacoco"
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
jacoco {
|
jacoco {
|
||||||
toolVersion = "0.8.1"
|
toolVersion = "0.8.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
|
|
|
@ -141,48 +141,33 @@ project.ext.testJava8Only = []
|
||||||
project.ext.testJava8Minimum = []
|
project.ext.testJava8Minimum = []
|
||||||
|
|
||||||
tasks.withType(Test) {
|
tasks.withType(Test) {
|
||||||
if (name.endsWith("Java7") || name.endsWith("Java9") || name.endsWith("Java10")) {
|
if (name.endsWith("Java7") || name.endsWith("Java9") || name.endsWith("Java10") || name.endsWith("Java11")) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def cloned = it
|
def cloned = it
|
||||||
|
|
||||||
def java7Home = System.getenv("JAVA7_HOME")
|
[7, 9, 10, 11].each { i ->
|
||||||
if (java7Home != null) {
|
def javaHome = System.getenv("JAVA${i}_HOME")
|
||||||
def testJ7 = task "${cloned.name}Java7"(type: cloned.class) {
|
if (javaHome != null) {
|
||||||
description "Runs $cloned.name under java 7"
|
def test = task "${cloned.name}Java${i}"(type: cloned.class) {
|
||||||
executable = "$java7Home/bin/java"
|
group = "Verification"
|
||||||
|
description "Runs $cloned.name under Java ${i}"
|
||||||
|
executable = "$javaHome/bin/java"
|
||||||
|
if (i == 7) {
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
exclude project.testJava8Only
|
exclude project.testJava8Only
|
||||||
exclude project.testJava8Minimum
|
exclude project.testJava8Minimum
|
||||||
}
|
}
|
||||||
}
|
} else if (i > 8) {
|
||||||
tasks.check.dependsOn testJ7
|
afterEvaluate {
|
||||||
}
|
|
||||||
|
|
||||||
def java9Home = System.getenv("JAVA9_HOME")
|
|
||||||
if (java9Home != null) {
|
|
||||||
def testJ9 = task "${cloned.name}Java9"(type: cloned.class) {
|
|
||||||
description "Runs $cloned.name under java 9"
|
|
||||||
executable = "$java9Home/bin/java"
|
|
||||||
project.afterEvaluate {
|
|
||||||
exclude project.testJava8Only
|
exclude project.testJava8Only
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tasks.check.dependsOn testJ9
|
|
||||||
}
|
}
|
||||||
|
tasks.check.dependsOn test
|
||||||
def java10Home = System.getenv("JAVA10_HOME")
|
|
||||||
if (java10Home != null) {
|
|
||||||
def testJ10 = task "${cloned.name}Java10"(type: cloned.class) {
|
|
||||||
description "Runs $cloned.name under java 10"
|
|
||||||
executable = "$java10Home/bin/java"
|
|
||||||
project.afterEvaluate {
|
|
||||||
exclude project.testJava8Only
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tasks.check.dependsOn testJ10
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/gradle/checkstyle.gradle"
|
apply from: "$rootDir/gradle/checkstyle.gradle"
|
||||||
|
|
Loading…
Reference in New Issue