diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2017-11-15 19:48:17 +0100 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2017-11-15 19:48:17 +0100 |
commit | e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a (patch) | |
tree | 95186e1e9d8e6c47b348a50294e8fc16a71033a6 | |
parent | dd7809acf62bf880feffcf5a46e98aa63006ca8b (diff) | |
download | jacoco-e1502d10bfe8eda0a921cc8f34db3fb8f7236c4a.tar.gz |
Add build with JDK 10-ea
-rwxr-xr-x | .travis.sh | 6 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | org.jacoco.core.test/src-java7/org/jacoco/core/test/filter/TryWithResourcesTest.java | 2 | ||||
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/test/validation/ExceptionsTest.java | 8 |
4 files changed, 14 insertions, 4 deletions
@@ -61,6 +61,9 @@ case "$JDK" in 9) install_jdk $JDK9_URL ;; +10-ea) + install_jdk $JDK10_EA_URL + ;; esac # Do not use "~/.mavenrc" set by Travis (https://github.com/travis-ci/travis-ci/issues/3893), @@ -95,6 +98,9 @@ case "$JDK" in mvn -V -B -e verify -Dbytecode.version=1.9 \ -Dinvoker.mavenOpts="-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts" ;; +10-ea) + mvn -V -B -e verify -Dbytecode.version=1.9 + ;; *) echo "Incorrect JDK [$JDK]" exit 1; diff --git a/.travis.yml b/.travis.yml index e39a5874..f62f80e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,11 @@ env: ECJ=true - JDK=8-ea - JDK=9 + - JDK=10-ea matrix: allow_failures: - env: JDK=8-ea + - env: JDK=10-ea script: ./.travis.sh diff --git a/org.jacoco.core.test/src-java7/org/jacoco/core/test/filter/TryWithResourcesTest.java b/org.jacoco.core.test/src-java7/org/jacoco/core/test/filter/TryWithResourcesTest.java index df3f5f77..6c9db09c 100644 --- a/org.jacoco.core.test/src-java7/org/jacoco/core/test/filter/TryWithResourcesTest.java +++ b/org.jacoco.core.test/src-java7/org/jacoco/core/test/filter/TryWithResourcesTest.java @@ -164,7 +164,7 @@ public class TryWithResourcesTest extends ValidationTestBase { // empty when EJC: if (isJDKCompiler) { final String jdkVersion = System.getProperty("java.version"); - if (jdkVersion.startsWith("9")) { + if (jdkVersion.startsWith("9") || jdkVersion.startsWith("10")) { assertLine("empty.close", ICounter.FULLY_COVERED, 0, 0); } else { // branches with javac 7 and 8 diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ExceptionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ExceptionsTest.java index 053a162e..e1baec7d 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ExceptionsTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ExceptionsTest.java @@ -27,11 +27,13 @@ public class ExceptionsTest extends ValidationTestBase { * https://bugs.openjdk.java.net/browse/JDK-8180660 */ private static final boolean isJDK8u152; + private static final boolean isJDK10; static { final Matcher m = Pattern.compile("1\\.8\\.0_(\\d++)(-ea)?") .matcher(System.getProperty("java.version")); isJDK8u152 = m.matches() && Integer.parseInt(m.group(1)) >= 152; + isJDK10 = System.getProperty("java.version").startsWith("10"); } public ExceptionsTest() { @@ -116,7 +118,7 @@ public class ExceptionsTest extends ValidationTestBase { if (!isJDKCompiler) { assertLine("noExceptionFinally.finallyBlockEnd", ICounter.NOT_COVERED); - } else if (isJDK8u152) { + } else if (isJDK8u152 || isJDK10) { assertLine("noExceptionFinally.finallyBlockEnd", ICounter.PARTLY_COVERED); } else { @@ -139,7 +141,7 @@ public class ExceptionsTest extends ValidationTestBase { if (!isJDKCompiler) { assertLine("implicitExceptionFinally.finallyBlockEnd", ICounter.FULLY_COVERED); - } else if (isJDK8u152) { + } else if (isJDK8u152 || isJDK10) { assertLine("implicitExceptionFinally.finallyBlockEnd", ICounter.PARTLY_COVERED); } else { @@ -157,7 +159,7 @@ public class ExceptionsTest extends ValidationTestBase { isJDKCompiler ? ICounter.EMPTY : ICounter.FULLY_COVERED); assertLine("explicitExceptionFinally.finallyBlock", ICounter.FULLY_COVERED); - if (!isJDKCompiler || isJDK8u152) { + if (!isJDKCompiler || isJDK8u152 || isJDK10) { assertLine("explicitExceptionFinally.finallyBlockEnd", ICounter.FULLY_COVERED); } else { |