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 install $INSTALL_ZULU
|
||||
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:
|
||||
at: .
|
||||
|
@ -131,6 +135,13 @@ jobs:
|
|||
- TEST_TASK: testJava10 latestDepTestJava10
|
||||
- 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:
|
||||
<<: *defaults
|
||||
docker:
|
||||
|
@ -255,6 +266,12 @@ workflows:
|
|||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- test_11:
|
||||
requires:
|
||||
- build
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
|
||||
- agent_integration_tests:
|
||||
requires:
|
||||
|
@ -276,6 +293,7 @@ workflows:
|
|||
- test_8
|
||||
- test_9
|
||||
- test_10
|
||||
- test_11
|
||||
- agent_integration_tests
|
||||
filters:
|
||||
branches:
|
||||
|
@ -289,6 +307,7 @@ workflows:
|
|||
- test_8
|
||||
- test_9
|
||||
- test_10
|
||||
- test_11
|
||||
- agent_integration_tests
|
||||
filters:
|
||||
branches:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
apply plugin: "jacoco"
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.1"
|
||||
toolVersion = "0.8.2"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
|
|
|
@ -141,47 +141,32 @@ project.ext.testJava8Only = []
|
|||
project.ext.testJava8Minimum = []
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
def cloned = it
|
||||
|
||||
def java7Home = System.getenv("JAVA7_HOME")
|
||||
if (java7Home != null) {
|
||||
def testJ7 = task "${cloned.name}Java7"(type: cloned.class) {
|
||||
description "Runs $cloned.name under java 7"
|
||||
executable = "$java7Home/bin/java"
|
||||
afterEvaluate {
|
||||
exclude project.testJava8Only
|
||||
exclude project.testJava8Minimum
|
||||
[7, 9, 10, 11].each { i ->
|
||||
def javaHome = System.getenv("JAVA${i}_HOME")
|
||||
if (javaHome != null) {
|
||||
def test = task "${cloned.name}Java${i}"(type: cloned.class) {
|
||||
group = "Verification"
|
||||
description "Runs $cloned.name under Java ${i}"
|
||||
executable = "$javaHome/bin/java"
|
||||
if (i == 7) {
|
||||
afterEvaluate {
|
||||
exclude project.testJava8Only
|
||||
exclude project.testJava8Minimum
|
||||
}
|
||||
} else if (i > 8) {
|
||||
afterEvaluate {
|
||||
exclude project.testJava8Only
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.check.dependsOn test
|
||||
}
|
||||
tasks.check.dependsOn testJ7
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
tasks.check.dependsOn testJ9
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue