groovy git commit: remove dup in test jvmArgs plus reduce locale issues on jdk9+

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

groovy git commit: remove dup in test jvmArgs plus reduce locale issues on jdk9+

paulk
Repository: groovy
Updated Branches:
  refs/heads/master 6a7758b6e -> 65acbdfc3


remove dup in test jvmArgs plus reduce locale issues on jdk9+


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/65acbdfc
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/65acbdfc
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/65acbdfc

Branch: refs/heads/master
Commit: 65acbdfc3e6fb076f9cf7be272e8e9014a8bdad4
Parents: 6a7758b
Author: Paul King <[hidden email]>
Authored: Sun Jul 8 22:24:54 2018 +1000
Committer: Paul King <[hidden email]>
Committed: Sun Jul 8 22:24:54 2018 +1000

----------------------------------------------------------------------
 gradle/test.gradle | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/65acbdfc/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 02628e2..2abca7c 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -18,10 +18,15 @@
  */
 allprojects {
     tasks.withType(Test) {
-        if (JavaVersion.current().isJava8Compatible()) {
-            jvmArgs '-ea', "-Xms${groovyJUnit_ms}", "-Xmx${groovyJUnit_mx}", "-XX:+UseConcMarkSweepGC", "-Duser.language=en"
+        def jdk8 = ['-XX:+UseConcMarkSweepGC']
+        def jdk9 = ['-Djava.locale.providers=COMPAT,SPI']
+        def common = ['-ea', "-Xms${groovyJUnit_ms}", "-Xmx${groovyJUnit_mx}", "-Duser.language=en" ]
+        if (JavaVersion.current().isJava9Compatible()) {
+            jvmArgs (*common, *jdk9)
+        } else if (JavaVersion.current().isJava8Compatible()) {
+            jvmArgs (*common, *jdk8)
         } else {
-            jvmArgs '-ea', "-Xms${groovyJUnit_ms}", "-Xmx${groovyJUnit_mx}", "-XX:PermSize=${groovyJUnit_permSize}", "-XX:MaxPermSize=${groovyJUnit_maxPermSize}", "-XX:+UseConcMarkSweepGC", "-Duser.language=en"
+            jvmArgs (*common, "-XX:PermSize=${groovyJUnit_permSize}", "-XX:MaxPermSize=${groovyJUnit_maxPermSize}")
         }
         def headless = System.properties['java.awt.headless']
         if (headless == 'true') {