From c7e52bcd6c34b56de46e2d3b6361e558cfc9a4d9 Mon Sep 17 00:00:00 2001 From: Miloslav Metelka <miloslav.metelka@oracle.com> Date: Tue, 16 May 2017 13:06:47 +0200 Subject: [PATCH] Added FastR compilation on JDK9 to gate. --- ci.hocon | 18 ++++++++++++++++++ .../builtins/TestBuiltin_weekdaysDate.java | 8 +++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ci.hocon b/ci.hocon index 9e85b47df5..5c04f82cf9 100644 --- a/ci.hocon +++ b/ci.hocon @@ -7,6 +7,7 @@ java7 : {name : oraclejdk, version : "7", platformspecific: true} # java 8 must be a jvmci enabled variant java8 : {name : labsjdk, version : "8-jvmci-latest", platformspecific: true} +java9 : {name : labsjdk, version : "9-ea+168", platformspecific: true} java8Downloads : { downloads : { @@ -17,6 +18,16 @@ java8Downloads : { } } +java9Downloads : { + downloads : { + EXTRA_JAVA_HOMES : { pathlist :[ + ${java7} + ${java8} + ]} + JAVA_HOME : ${java9} + } +} + logfiles : [ "fastr_errors.log" "results.json" @@ -123,6 +134,12 @@ gateTestManagedLinux: ${common} { ] } +gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} { + downloads : { + JAVA_HOME : ${java9Downloads.downloads.JAVA_HOME} + EXTRA_JAVA_HOMES : ${java9Downloads.downloads.EXTRA_JAVA_HOMES} + } +} # This performs a number of "style" checks on the code to ensure it confirms to the project standards. @@ -171,4 +188,5 @@ builds = [ ${rbcheck} {capabilities : [linux, amd64], targets : [gate], name: "gate-rbcheck-linux-amd64"} ${internalPkgtest} {capabilities : [linux, amd64], targets : [gate], name: "gate-internal-pkgtest-linux-amd64"} ${gateTestManagedLinux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-managed-linux-amd64"} + ${gateTestJava9Linux} {capabilities : [linux, amd64, fast], targets : [gate], name: "gate-test-java9-linux-amd64"} ] diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_weekdaysDate.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_weekdaysDate.java index 8ab38d35b6..00e6bb6e19 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_weekdaysDate.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_weekdaysDate.java @@ -4,7 +4,7 @@ * http://www.gnu.org/licenses/gpl-2.0.html * * Copyright (c) 2014, Purdue University - * Copyright (c) 2014, 2016, Oracle and/or its affiliates + * Copyright (c) 2014, 2017, Oracle and/or its affiliates * * All rights reserved. */ @@ -13,6 +13,7 @@ package com.oracle.truffle.r.test.builtins; import org.junit.Test; import com.oracle.truffle.r.test.TestBase; +import java.util.Locale; // Checkstyle: stop line length check @@ -20,6 +21,11 @@ public class TestBuiltin_weekdaysDate extends TestBase { @Test public void testweekdaysDate1() { + // Explicit locale setting is a workaround to run this test on JDK9. + // Otherwise the test was returning "Thu" instead of "Thursday" + // due to JDK bug 8130845. + Locale.setDefault(Locale.ENGLISH); + assertEval("argv <- structure(list(x = structure(16352, class = 'Date')), .Names = 'x');do.call('weekdays.Date', argv)"); } } -- GitLab