This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 6091dffa7e Add targets allowing running the testsuite with the minimum
Java version
6091dffa7e is described below
commit 6091dffa7edd100d55d42c4f09fdf945ac54e67c
Author: remm <[email protected]>
AuthorDate: Thu Jun 20 11:12:37 2024 +0200
Add targets allowing running the testsuite with the minimum Java version
From Rainer.
---
build.xml | 25 ++++++++++++++++++++++---
webapps/docs/changelog.xml | 9 +++++++++
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/build.xml b/build.xml
index 8a833daaa4..39108eb99b 100644
--- a/build.xml
+++ b/build.xml
@@ -110,11 +110,15 @@
<property name="min.java.version" value="11"/>
<property name="build.java.version" value="17"/>
<property name="release.java.version" value="22"/>
+ <property name="skip.build.java.version" value="false"/>
<!-- Check Java Build Version -->
<fail message="Java version ${build.java.version} or newer is required
(${java.version} is installed)">
<condition>
- <not><javaversion atleast="${build.java.version}" /></not>
+ <and>
+ <not><javaversion atleast="${build.java.version}"/></not>
+ <not><istrue value="${skip.build.java.version}"/></not>
+ </and>
</condition>
</fail>
@@ -1935,6 +1939,9 @@
<target name="test" description="Runs the JUnit test cases"
depends="test-nio,test-nio2,coverage-report,test-status" />
+ <target name="test-only" description="Runs the JUnit test cases, without
compilation"
+ depends="test-only-nio,test-only-nio2,test-status" />
+
<target name="test-status"
description="Analyses logs directory and reports on skipped tests,
test failures and test errors">
<fileset id="test.result.skippedtests" dir="${test.reports}"
includes="*.txt">
@@ -1976,12 +1983,24 @@
extension=".NIO" />
</target>
+ <target name="test-only-nio" description="Runs the JUnit test cases or NIO
without test preparations. Does not stop on errors."
+ depends="setup-jacoco,test-openssl-exists" if="${execute.test.nio}">
+ <runtests protocol="org.apache.coyote.http11.Http11Nio2Protocol"
+ extension=".NIO" />
+ </target>
+
<target name="test-nio2" description="Runs the JUnit test cases for NIO2.
Does not stop on errors."
depends="setup-jacoco,test-compile,deploy,test-openssl-exists"
if="${execute.test.nio2}">
<runtests protocol="org.apache.coyote.http11.Http11Nio2Protocol"
extension=".NIO2" />
</target>
+ <target name="test-only-nio2" description="Runs the JUnit test cases or NIO2
without test preparations. Does not stop on errors."
+ depends="setup-jacoco,test-openssl-exists" if="${execute.test.nio2}">
+ <runtests protocol="org.apache.coyote.http11.Http11Nio2Protocol"
+ extension=".NIO2" />
+ </target>
+
<target name="test-openssl-exists" description="Checks for the OpenSSL
binary">
<property environment="env" />
<condition property="test.openssl.exists">
@@ -3995,7 +4014,7 @@ Read the Building page on the Apache Tomcat documentation
site for details on ho
</antcall>
</target>
- <target name="setup-bnd" depends="download-bnd">
+ <target name="setup-bnd" depends="download-bnd"
unless="skip.build.java.version">
<!-- Add bnd tasks to project -->
<path id="bnd.classpath">
<fileset file="${bnd.jar}" />
@@ -4070,7 +4089,7 @@ Read the Building page on the Apache Tomcat documentation
site for details on ho
</sequential>
</macrodef>
- <target name="add-osgi" if="${addOSGi}" >
+ <target name="add-osgi" if="${addOSGi}" unless="skip.build.java.version">
<echo message="add-osgi ${jarfile} ${addOSGi}"></echo>
<local name="filename"/>
<basename property="filename" file="${jarfile}"/>
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e52f7d98db..26a9fe9588 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -122,6 +122,15 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Other">
+ <changelog>
+ <update>
+ Add <code>test-only</code> build target to allow running only the
+ testsuite, supporting Java versions down to the minimum supported
+ to run Tomcat. (rjung)
+ </update>
+ </changelog>
+ </subsection>
</section>
<section name="Tomcat 10.1.25 (schultz)" rtext="release in progress">
<subsection name="Catalina">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]