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

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 032cf3e545 Add targets allowing running the testsuite with the minimum 
Java version
032cf3e545 is described below

commit 032cf3e54531bd3a697b506db2924d19c6ff4560
Author: remm <r...@apache.org>
AuthorDate: Thu Jun 20 11:12:37 2024 +0200

    Add targets allowing running the testsuite with the minimum Java version
    
    From Rainer.
---
 build.xml                  | 30 +++++++++++++++++++++++++++---
 webapps/docs/changelog.xml |  9 +++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/build.xml b/build.xml
index f14d52bf93..ec969d0cfe 100644
--- a/build.xml
+++ b/build.xml
@@ -108,13 +108,15 @@
   <property name="compile.release" value="8"/>
   <property name="min.java.version" value="8"/>
   <property name="build.java.version" value="17"/>
+  <property name="release.java.version" value="17"/>
+  <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>
       <and>
-        <not><javaversion atleast="${build.java.version}" /></not>
-        <not><isset property="skip.build.java.version"/></not>
+        <not><javaversion atleast="${build.java.version}"/></not>
+        <not><istrue value="${skip.build.java.version}"/></not>
       </and>
     </condition>
   </fail>
@@ -1879,6 +1881,9 @@
   <target name="test" description="Runs the JUnit test cases"
           depends="test-nio,test-nio2,test-apr,coverage-report,test-status" />
 
+  <target name="test-only" description="Runs the JUnit test cases, without 
compilation"
+          depends="test-only-nio,test-only-nio2,test-only-apr,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">
@@ -1920,12 +1925,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-apr" description="Runs the JUnit test cases for APR. Does 
not stop on errors."
           
depends="setup-jacoco,test-compile,deploy,test-apr-exists,test-openssl-exists"
           if="${apr.exists}">
@@ -1933,6 +1950,13 @@
               extension=".APR" />
   </target>
 
+  <target name="test-only-apr" description="Runs the JUnit test cases for APR 
without test preparations. Does not stop on errors."
+          depends="setup-jacoco,test-apr-exists,test-openssl-exists"
+          if="${apr.exists}">
+    <runtests protocol="org.apache.coyote.http11.Http11AprProtocol"
+              extension=".APR" />
+  </target>
+
   <target name="test-apr-exists" description="Checks for APR lib"
           if="${execute.test.apr}">
     <available file="${test.apr.loc}" property="apr.exists" />
@@ -3924,7 +3948,7 @@ Read the Building page on the Apache Tomcat documentation 
site for details on ho
     </antcall>
   </target>
 
-  <target name="setup-bnd" depends="download-bnd" 
unless="skip.build.java.version" >
+  <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}" />
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 274924aa06..328349c6ca 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,6 +124,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 9.0.90 (remm)" rtext="release in progress">
   <subsection name="Catalina">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to