You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/01/31 11:37:29 UTC

svn commit: r1781065 - in /tomcat/native/trunk: ./ build.properties.default build.xml xdocs/miscellaneous/changelog.xml

Author: markt
Date: Tue Jan 31 11:37:29 2017
New Revision: 1781065

URL: http://svn.apache.org/viewvc?rev=1781065&view=rev
Log:
Update to JUnit 4 and use an external to pull in the tests from 9.0.x

Modified:
    tomcat/native/trunk/   (props changed)
    tomcat/native/trunk/build.properties.default
    tomcat/native/trunk/build.xml
    tomcat/native/trunk/xdocs/miscellaneous/changelog.xml

Propchange: tomcat/native/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jan 31 11:37:29 2017
@@ -1,4 +1,6 @@
 .classpath
 .project
 .settings
+build.properties
 dist
+logs

Modified: tomcat/native/trunk/build.properties.default
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/build.properties.default?rev=1781065&r1=1781064&r2=1781065&view=diff
==============================================================================
--- tomcat/native/trunk/build.properties.default (original)
+++ tomcat/native/trunk/build.properties.default Tue Jan 31 11:37:29 2017
@@ -36,16 +36,16 @@ compile.debug=off
 compile.deprecation=on
 compile.optimize=on
 
-base-tomcat.loc=http://archive.apache.org/dist/tomcat
-base-sf.loc=http://downloads.sourceforge.net
+base-maven.loc=http://repo.maven.apache.org/maven2
 
-# ----- JUnit Unit Test Suite, version 3.8 or later -----
-# The JUnit version we will use
-junit.version=3.8.2
-# The directory containing your binary distribution of JUnit
-# It will be automatically downloaded if it doesn't exist
-junit.home=${base.path}/junit${junit.version}
-# The pathname of the "junit.jar" JAR file
-junit.jar=${junit.home}/junit.jar
-# The URL used to download JUnit if needed
-junit.loc=${base-sf.loc}/junit/junit${junit.version}.zip
+# ----- JUnit Unit Test Suite, version 4.11 or later -----
+junit.version=4.11
+junit.home=${base.path}/junit-${junit.version}
+junit.jar=${junit.home}/junit-${junit.version}.jar
+junit.loc=${base-maven.loc}/junit/junit/${junit.version}/junit-${junit.version}.jar
+
+# ----- Hamcrest Library, used by JUnit, version 1.3 or later ----
+hamcrest.version=1.3
+hamcrest.home=${base.path}/hamcrest-${hamcrest.version}
+hamcrest.jar=${hamcrest.home}/hamcrest-core-${hamcrest.version}.jar
+hamcrest.loc=${base-maven.loc}/org/hamcrest/hamcrest-core/${hamcrest.version}/hamcrest-core-${hamcrest.version}.jar

Modified: tomcat/native/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/build.xml?rev=1781065&r1=1781064&r2=1781065&view=diff
==============================================================================
--- tomcat/native/trunk/build.xml (original)
+++ tomcat/native/trunk/build.xml Tue Jan 31 11:37:29 2017
@@ -68,6 +68,7 @@
         <pathelement location="${build.dest}/java"/>
         <pathelement location="${build.dest}/test"/>
         <pathelement location="${junit.jar}"/>
+        <pathelement location="${hamcrest.jar}"/>
     </path>
 
     <!-- Examples classpath -->
@@ -90,7 +91,8 @@
     </target>
 
     <target name="prepare" depends="env">
-       <mkdir dir="${build.dir}"/>
+        <mkdir dir="${build.dir}"/>
+        <mkdir dir="${basedir}/logs"/>
     </target>
 
     <!-- Download and dependency building -->
@@ -217,7 +219,8 @@ limitations under the License.--&gt;">
             debug="${compile.debug}"
             deprecation="${compile.deprecation}"
             optimize="${compile.optimize}"
-            encoding="ISO-8859-1">
+            encoding="ISO-8859-1"
+            includeantruntime="false">
             <classpath refid="classpath"/>
         </javac>
 
@@ -281,7 +284,8 @@ limitations under the License.--&gt;">
             debug="on"
             deprecation="${compile.deprecation}"
             optimize="${compile.optimize}"
-            encoding="ISO-8859-1">
+            encoding="ISO-8859-1"
+            includeantruntime="false">
             <classpath refid="test.classpath"/>
         </javac>
         <copy todir="${build.dest}/test" filtering="yes" encoding="ISO-8859-1">
@@ -297,13 +301,19 @@ limitations under the License.--&gt;">
     <!-- =================================================================== -->
     <target name="test" depends="compile-tests" description="Run the tests">
         <echo message="Running Tomcat Native package tests ..."/>
-        <java dir="${test.dir}" classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
-            <arg value="org.apache.tomcat.jni.SocketServerTestSuite"/>
-            <classpath refid="test.classpath"/>
-            <env key="PATH" path="${tc.library.path}:${java.library.path}"/>
-            <env key="Path" path="${tc.library.path}:${java.library.path}"/>
+        <junit printsummary="yes" fork="yes" dir="." showoutput="yes"
+            haltonfailure="${test.failonerror}" >
+
+            <formatter type="plain"/>
+
             <jvmarg value="-Djava.library.path=${tc.library.path}"/>
-        </java>
+
+            <classpath refid="test.classpath" />
+
+            <batchtest todir="${basedir}/logs">
+                <fileset dir="test" />
+            </batchtest>
+        </junit>
     </target>
 
     <!-- =================================================================== -->

Modified: tomcat/native/trunk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/xdocs/miscellaneous/changelog.xml?rev=1781065&r1=1781064&r2=1781065&view=diff
==============================================================================
--- tomcat/native/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/trunk/xdocs/miscellaneous/changelog.xml Tue Jan 31 11:37:29 2017
@@ -37,6 +37,11 @@
 <section name="Changes in 1.2.11">
   <changelog>
     <fix>
+      <bug>58082</bug>: Update unit tests to use JUnit 4. Refactor unit tests
+      into separate tests and use an external to reference them in the same way
+      an external is used to reference the main code. (markt)
+    </fix>
+    <fix>
       <bug>59996</bug>: Correctly handle building tc-native on a 64-bit system
       when using an OpenSSL distribution that is not in <code>/usr</code>.
       (csutherl)



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