aboutsummaryrefslogtreecommitdiff
path: root/buildScripts/tests.ant.xml
diff options
context:
space:
mode:
Diffstat (limited to 'buildScripts/tests.ant.xml')
-rw-r--r--buildScripts/tests.ant.xml86
1 files changed, 76 insertions, 10 deletions
diff --git a/buildScripts/tests.ant.xml b/buildScripts/tests.ant.xml
index 0191d642..d34e1f82 100644
--- a/buildScripts/tests.ant.xml
+++ b/buildScripts/tests.ant.xml
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2020-2021 The Project Lombok Authors.
+ Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -55,6 +55,24 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
</ivy:compile>
</target>
+ <target name="test.eclipse.compile" depends="deps.eclipse.oxygen, compile" description="compiles the eclipse tests" unless="skip.tests">
+ <mkdir dir="build/tests" />
+ <path id="cp.eclipse">
+ <fileset dir="testenv/eclipse-oxygen/plugins">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+ <ivy:compile destdir="build/tests" source="1.8" target="1.8" ecj="true" nowarn="true">
+ <bootclasspath path="${jdk8-rt.loc}" />
+ <classpath refid="cp.eclipse" />
+ <classpath refid="cp.test" />
+ <classpath refid="cp.javac8" />
+ <classpath refid="packing.basedirs.path" />
+ <classpath path="build/tests" />
+ <src path="test/eclipse/src" />
+ </ivy:compile>
+ </target>
+
<target name="test.ecj11.call" depends="deps, dist" description="Runs a few ecj-specific tests" unless="skip.tests">
<java jar="lib/ecj11/org.eclipse.jdt-ecj.jar" fork="true" failonerror="true">
<jvmarg value="-javaagent:dist/lombok.jar=ecj" />
@@ -126,14 +144,14 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
<test.javacX version="11" />
</target>
- <!-- For non-LTS versions, feel free to aggressively update these to the current non-LTS openjdk version, and delete them once they roll out of the 6 month window. -->
-
<target name="test.javac17" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, using javac17 as underlying compiler">
<test.javacX version="17" />
</target>
- <target name="test.javac18" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, using javac18 as underlying compiler">
- <test.javacX version="18" />
+ <!-- For non-LTS versions, feel free to aggressively update these to the current non-LTS openjdk version, and delete them once they roll out of the 6 month window. -->
+
+ <target name="test.javac19" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, using javac19 as underlying compiler">
+ <test.javacX version="19" />
</target>
<target name="test.javacCurrent" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, using its javac as underlying compiler">
@@ -157,7 +175,7 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
<condition property="compiler.compliance.level" value="-Dcompiler.compliance.level=@{compiler.compliance.level}" else="-Dnot=set">
<not><equals arg1="@{compiler.compliance.level}" arg2="latest" /></not>
</condition>
- <echo>Running TestEclipse on eclipse-@{version} on JVM${ant.java.version} using. Compiler compliance level: @{compiler.compliance.level}</echo>
+ <echo>Running TestEclipse on eclipse-@{version} on JVM${ant.java.version}. Compiler compliance level: @{compiler.compliance.level}</echo>
<junit haltonfailure="yes" fork="true" forkmode="once">
<formatter classname="lombok.ant.SimpleTestFormatter" usefile="false" unless="tests.quiet" />
<jvmarg value="-Xbootclasspath/a:${jdk8-rt.loc}" />
@@ -176,6 +194,11 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
</sequential>
</macrodef>
+ <target name="test.eclipse-202212" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the 2022-12 release of eclipse">
+ <fetchdep.eclipse version="202212" />
+ <test.eclipse-X version="202212" />
+ </target>
+
<target name="test.eclipse-oxygen" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the oxygen release of eclipse">
<test.eclipse-X version="oxygen" />
</target>
@@ -190,6 +213,44 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
<test.eclipse-X version="202006" compiler.compliance.level="8" />
</target>
+ <macrodef name="test.eclipse-X-full">
+ <attribute name="version" />
+ <sequential>
+ <path id="cp.eclipse-@{version}">
+ <fileset dir="testenv/eclipse-@{version}/plugins">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+ <echo>Running EclipseTests on eclipse-@{version} on JVM${ant.java.version}</echo>
+ <condition property="os.specific.firstThread" value="-XstartOnFirstThread">
+ <os name="Mac OS X" />
+ </condition>
+ <!-- On Mac OS X, -XstartOnFirstThread is required, on other OSes, the JVM doesn't recognize the option. -showversion serves as a no-op -->
+ <property name="os.specific.firstThread" value="-showversion" />
+ <junit haltonfailure="yes" fork="true" forkmode="once">
+ <formatter classname="lombok.ant.SimpleTestFormatter" usefile="false" unless="tests.quiet" />
+ <jvmarg value="-javaagent:dist/lombok.jar" />
+ <jvmarg value="${os.specific.firstThread}" />
+ <jvmarg value="-Dlombok.testenv=testenv/eclipse-@{version}" />
+ <classpath refid="cp.eclipse-@{version}" />
+ <classpath location="build/ant" />
+ <classpath refid="cp.test" />
+ <classpath refid="cp.eclipse-@{version}" />
+ <classpath refid="packing.basedirs.path" />
+ <classpath location="build/tests" />
+ <test name="lombok.eclipse.EclipseTests" />
+ </junit>
+ </sequential>
+ </macrodef>
+
+ <target name="test.eclipse-oxygen-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.oxygen" description="runs the full eclipse tests on your default VM, testing the oxygen release of eclipse">
+ <test.eclipse-X-full version="oxygen" />
+ </target>
+
+ <target name="test.eclipse-2022-03-full" depends="test.formatter.compile, test.eclipse.compile, deps.eclipse.2022-03" description="runs the full eclipse tests on your default VM, testing the 2022-03 release of eclipse">
+ <test.eclipse-X-full version="2022-03" />
+ </target>
+
<macrodef name="test.ecj-X">
<attribute name="version" />
<sequential>
@@ -216,16 +277,21 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
<test.ecj-X version="11" />
</target>
- <target name="test.ecj14" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj11 release">
+ <target name="test.ecj14" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj14 release">
<fetchdep.ecj version="14" />
<test.ecj-X version="14" />
</target>
- <target name="test.ecj16" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj11 release">
+ <target name="test.ecj16" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj16 release">
<fetchdep.ecj version="16" />
<test.ecj-X version="16" />
</target>
- <target name="test" depends="test.javacCurrent, test.eclipse-202006" description="runs the tests against the default JVM, javac, and eclipse" />
- <target name="test.broad" depends="test.javac8, test.javac17, test.javac18, test.eclipse-oxygen, test.eclipse-202006, test.eclipse-202006-jdk8" description="runs the tests against the default JVM, javac, and eclipse" />
+ <target name="test.ecj19" depends="test.formatter.compile, test.compile" description="runs the tests on your default VM, testing the ecj19 release">
+ <fetchdep.ecj version="19" />
+ <test.ecj-X version="19" />
+ </target>
+
+ <target name="test" depends="test.javacCurrent, test.eclipse-202212" description="runs the tests against the default JVM, javac, and eclipse" />
+ <target name="test.broad" depends="test.javac8, test.javac17, test.javac19, test.eclipse-oxygen, test.eclipse-202212, test.eclipse-202006-jdk8" description="runs the tests against the default JVM, javac, and eclipse" />
</project>