You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ps...@apache.org on 2015/07/28 00:25:01 UTC

svn commit: r1692968 - in /commons/proper/pool/trunk: build.properties.sample build.xml

Author: psteitz
Date: Mon Jul 27 22:25:01 2015
New Revision: 1692968

URL: http://svn.apache.org/r1692968
Log:
Added ant target to verify jar.

Modified:
    commons/proper/pool/trunk/build.properties.sample
    commons/proper/pool/trunk/build.xml

Modified: commons/proper/pool/trunk/build.properties.sample
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/build.properties.sample?rev=1692968&r1=1692967&r2=1692968&view=diff
==============================================================================
--- commons/proper/pool/trunk/build.properties.sample (original)
+++ commons/proper/pool/trunk/build.properties.sample Mon Jul 27 22:25:01 2015
@@ -43,3 +43,6 @@ asm.jar=${asm.home}/asm-5.0.4.jar
 junit.home=${repository}/junit/junit/4.12
 junit.jar=${junit.home}/junit-4.12.jar
 hamcrest.jar=${repository}/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
+
+# Maven-generated jar to validate in test-jar target
+pool.jar=./target/commons-pool2-2.4.2-SNAPSHOT.jar

Modified: commons/proper/pool/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/build.xml?rev=1692968&r1=1692967&r2=1692968&view=diff
==============================================================================
--- commons/proper/pool/trunk/build.xml (original)
+++ commons/proper/pool/trunk/build.xml Mon Jul 27 22:25:01 2015
@@ -157,6 +157,31 @@
         </batchtest>
       </junit>
    </target>
+	
+   <target name="test-jar" depends="compile-test" description="runs (junit) unit tests">
+      <echo message="Because we need to sleep to test the eviction threads, this takes a little while (around 2 minutes)..."/>
+      <junit printsummary="true" showoutput="true" fork="yes" haltonerror="${test.failonerror}">
+        <classpath>
+          <pathelement location="${build.test-classes.dir}" /> 
+          <pathelement path="${classpath}:${pool.jar}" /> 
+          <pathelement location="${src.testresources.dir}" /> 
+        </classpath>
+        <!-- If test.entry is defined, run a single test, otherwise run all valid tests -->
+        <test name="${test.entry}" if="test.entry"/>
+        <batchtest todir="${build.dir}/ant-reports" unless="test.entry">
+          <fileset dir="${src.test.dir}">
+            <include name="**/Test*.java"/>
+            <exclude name="org/apache/commons/pool2/impl/TestSoftRefOutOfMemory.java"/>
+            <!-- abstract classes -->
+            <exclude name="**/TestObjectPool.java"/>
+            <exclude name="**/TestObjectPoolFactory.java"/>
+            <exclude name="**/TestKeyedObjectPool.java"/>
+            <exclude name="**/TestKeyedObjectPoolFactory.java"/>
+          </fileset>
+          <formatter type="plain" usefile="false"/>
+        </batchtest>
+      </junit>
+   </target>
 
    <target name="build-jar" depends="compile">
       <mkdir dir="${dist.dir}"/>