You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2025/07/18 12:30:07 UTC

(groovy) branch ant-task-tests created (now e0615279e5)

This is an automated email from the ASF dual-hosted git repository.

emilles pushed a change to branch ant-task-tests
in repository https://gitbox.apache.org/repos/asf/groovy.git


      at e0615279e5 GROOVY-10479: enable tests

This branch includes the following new commits:

     new e0615279e5 GROOVY-10479: enable tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(groovy) 01/01: GROOVY-10479: enable tests

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch ant-task-tests
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit e0615279e559b71eb36c96daaa17b18778ede6fd
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Fri Jul 18 07:29:39 2025 -0500

    GROOVY-10479: enable tests
---
 .../org/codehaus/groovy/ant/GroovycTest.xml        |  40 ++++++++++-----------
 .../codehaus/groovy/ant/commons-lang3-3.17.0.jar   | Bin 673587 -> 0 bytes
 .../codehaus/groovy/ant/commons-lang3-3.18.0.jar   | Bin 0 -> 702952 bytes
 .../org/codehaus/groovy/ant/GroovycTest.java       |  14 ++------
 4 files changed, 22 insertions(+), 32 deletions(-)

diff --git a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
index 73ceffbccb..773b081701 100644
--- a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
+++ b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/GroovycTest.xml
@@ -63,22 +63,22 @@
     </target>
 
     <target name="GroovycTest1_ForkGroovy_NoClasspath">
-        <compile-plain includes="**/GroovycTest1.groovy" fork="true"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithGroovyClasspath">
-        <compile-plain includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" fork="true"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithJavaClasspath">
-        <compile-plain includes="**/GroovycTest1.groovy" fork="true"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithBothClasspath">
-        <compile-plain includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" fork="true"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
     </target>
 
@@ -115,62 +115,62 @@
     </target>
 
     <target name="GroovycTest1_Joint_ForkGroovy_NoClasspath">
-        <compile-joint includes="**/GroovycTest1.groovy,**/GroovycTest2.java" fork="true"/>
+        <compile-joint fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy,**/GroovycTest2.java"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
     </target>
 
     <target name="GroovycTest1_Joint_ForkGroovy_WithGroovyClasspath">
-        <compile-joint includes="**/GroovycTest1.groovy,**/GroovycTest2.java" fork="true" classpathref="groovyMaterials"/>
+        <compile-joint fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy,**/GroovycTest2.java" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest2"/>
     </target>
 
     <target name="GroovycTest1_Joint_ForkGroovy_WithJavaClasspath">
-        <compile-joint includes="**/GroovycTest1.groovy,**/GroovycTest2.java" fork="true"/>
+        <compile-joint fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy,**/GroovycTest2.java"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
     </target>
 
     <target name="GroovycTest1_Joint_ForkGroovy_WithBothClasspath">
-        <compile-joint includes="**/GroovycTest1.groovy,**/GroovycTest2.java" fork="true" classpathref="groovyMaterials"/>
+        <compile-joint fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy,**/GroovycTest2.java" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest2" classpathref="groovyMaterials"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_NoClasspath_WithJavaHome">
-        <compile-plain includes="**/GroovycTest1.groovy" fork="true" javahome="${alt.java.home}"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" javahome="${alt.java.home}"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithGroovyClasspath_WithJavaHome">
-        <compile-plain includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" fork="true" javahome="${alt.java.home}"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" javahome="${alt.java.home}"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithJavaClasspath_WithJavaHome">
-        <compile-plain includes="**/GroovycTest1.groovy" fork="true" javahome="${alt.java.home}"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" javahome="${alt.java.home}"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_WithBothClasspath_WithJavaHome">
-        <compile-plain includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" fork="true" javahome="${alt.java.home}"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest1.groovy" classpathref="groovyMaterials" javahome="${alt.java.home}"/>
         <java classname="org.codehaus.groovy.ant.GroovycTest1" classpathref="groovyMaterials"/>
     </target>
 
     <target name="GroovycTest1_ForkGroovy_NoClasspath_Fail">
-        <compile-plain includes="**/GroovyTestBad1.groovy" fork="true"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovyTestBad1.groovy"/>
     </target>
 
     <target name="noForkNoAntRuntime">
-        <compile-plain includes="**/GroovycTest1.groovy" fork="false" includeantruntime="false"/>
+        <compile-plain fork="false" includeantruntime="false" includes="**/GroovycTest1.groovy"/>
     </target>
 
     <!-- GROOVY-9197 -->
     <target name="jointForkedCompilation_ExternalJarOnClasspath">
         <path id="the.classpath">
             <path refid="groovyMaterials"/>
-            <fileset file="commons-lang3-3.17.0.jar"/>
+            <fileset file="commons-lang3-3.18.0.jar"/>
         </path>
 
         <compile-joint fork="true" includeantruntime="false" includes="**/MakesExternalReference.java">
@@ -182,13 +182,13 @@
 
     <!-- GROOVY-11573 -->
     <target name="jointForkedCompilation_ParameterMetadataCheck">
-        <compile-joint fork="true" configscript="params.groovy" includes="**/ParameterMetadataCheck.java"/>
+        <compile-joint fork="true" includeantruntime="false" includes="**/ParameterMetadataCheck.java" configscript="params.groovy"/>
         <java classname="org.codehaus.groovy.ant.ParameterMetadataCheck"/>
     </target>
 
     <!-- GROOVY-11607 -->
     <target name="plainForkedCompilation_NestingSrcElementCheck">
-        <groovyc destdir="${destPath}" fork="true">
+        <groovyc destdir="${destPath}" fork="true" includeantruntime="false">
             <src>
                 <fileset dir="${srcPath}">
                     <include name="**/GroovycTest*.*"/>
@@ -202,16 +202,16 @@
 
     <!-- GROOVY-11666 -->
     <target name="incrementalCompilation">
-        <compile-plain includes="**/GroovycTest3*.groovy" fork="true" includeantruntime="false"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest3*.groovy"/>
 
         <local name="boo"/>
-        <compile-plain includes="**/GroovycTest3.groovy" fork="true" includeantruntime="false" updatedProperty="boo"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest3.groovy" updatedProperty="boo"/>
         <fail if="boo" message="GroovycTest3.groovy was re-compiled"/>
 
         <touch file="GroovycTest3.groovy"/>
 
         <local name="yay"/>
-        <compile-plain includes="**/GroovycTest3.groovy" fork="true" includeantruntime="false" updatedProperty="yay"/>
+        <compile-plain fork="true" includeantruntime="false" includes="**/GroovycTest3.groovy" updatedProperty="yay"/>
         <fail unless="yay" message="GroovycTest3.groovy was not re-compiled"/>
 
         <java classname="org.codehaus.groovy.ant.GroovycTest3"/>
diff --git a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.17.0.jar b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.17.0.jar
deleted file mode 100644
index f6486b4d70..0000000000
Binary files a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.17.0.jar and /dev/null differ
diff --git a/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.18.0.jar b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.18.0.jar
new file mode 100644
index 0000000000..9359e524af
Binary files /dev/null and b/subprojects/groovy-ant/src/test-resources/org/codehaus/groovy/ant/commons-lang3-3.18.0.jar differ
diff --git a/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java b/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
index 2919249ed7..8b11b25044 100644
--- a/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
+++ b/subprojects/groovy-ant/src/test/groovy/org/codehaus/groovy/ant/GroovycTest.java
@@ -22,7 +22,6 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectHelper;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 import java.io.ByteArrayOutputStream;
@@ -36,11 +35,9 @@ import java.net.URISyntaxException;
 import java.nio.file.Paths;
 import java.util.regex.Pattern;
 
-import static groovy.test.GroovyAssert.isAtLeastJdk;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
 
 /**
  * Unit tests for the {@link Groovyc} ant task.
@@ -194,25 +191,21 @@ final class GroovycTest {
 
     @Test
     void testGroovycTest1_NoFork_NoClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_NoFork_NoClasspath");
     }
 
     @Test
     void testGroovycTest1_NoFork_WithGroovyClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_NoFork_WithGroovyClasspath");
     }
 
     @Test
     void testGroovycTest1_NoFork_WithJavaClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_NoFork_WithJavaClasspath");
     }
 
     @Test
     void testGroovycTest1_NoFork_WithBothClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_NoFork_WithBothClasspath");
     }
 
@@ -238,13 +231,11 @@ final class GroovycTest {
 
     @Test
     void testGroovycTest1_Joint_NoFork_NoClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_Joint_NoFork_NoClasspath");
     }
 
     @Test
     void testGroovycTest1_Joint_NoFork_WithGroovyClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_Joint_NoFork_WithGroovyClasspath");
     }
 
@@ -273,13 +264,11 @@ final class GroovycTest {
 
     @Test
     void testGroovycTest1_Joint_NoFork_WithJavaClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_Joint_NoFork_WithJavaClasspath");
     }
 
     @Test
     void testGroovycTest1_Joint_NoFork_WithBothClasspath() {
-        assumeFalse(isAtLeastJdk("18.0")); // GROOVY-10479
         ensureExecutes("GroovycTest1_Joint_NoFork_WithBothClasspath");
     }
 
@@ -361,9 +350,10 @@ final class GroovycTest {
     }
 
     // GROOVY-11666
-    @Disabled @Test
+    @Test
     void testRestrictionForIncrementalCompilation() {
         ensureNotPresent("GroovycTest3");
+        ensureNotPresent("GroovycTest3Peer");
         project.executeTarget("incrementalCompilation");
         ensureResultOK("GroovycTest3");
     }