db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1848228 - /db/derby/code/trunk/build.xml
Date Wed, 05 Dec 2018 17:12:42 GMT
Author: rhillegas
Date: Wed Dec  5 17:12:42 2018
New Revision: 1848228

URL: http://svn.apache.org/viewvc?rev=1848228&view=rev
Log:
DERBY-6945: Add a top level target for running a single JUnit test class with the modulepath;
commit derby-6945-62-aa-runOneJUnitTestWithModulePath.diff.

Modified:
    db/derby/code/trunk/build.xml

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1848228&r1=1848227&r2=1848228&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed Dec  5 17:12:42 2018
@@ -2752,6 +2752,46 @@
     </java>
   </target>
 
+  <!-- Run a single junit test or suite with the modulepath -->
+  <target name="junit-single-with-modulepath"
+          depends="junit-init"
+          description="Run one JUnit test with the module path"
+  >
+    <condition property="noTestclassSet" value="">
+      <not>
+        <isset property="derby.junit.testclass"/>
+      </not>
+    </condition>
+    <fail if="noTestclassSet">No testclass selected! Set property derby.junit.testclass</fail>
+    <path id="junit.all.classpath">
+      <fileset dir="${derby.junit.test.jars}" includes="*.jar"/>
+      <pathelement location="${javatools.dir}/junit.jar"/>
+      <pathelement location="${lucene_core}"/>
+      <pathelement location="${lucene_a_co}"/>
+      <pathelement location="${lucene_qp}"/>
+      <pathelement location="${json_simple}"/>
+    </path>
+
+    <echo message="Modulepath used for JUnit tests with modulepath: ${toString:junit.all.classpath}"/>
+    <mkdir dir="junit_${derby.junit.timestamp}/junit-all"/>
+
+    <java 
+          modulepath="${toString:junit.all.classpath}"
+          module="junit"
+          classname="junit.textui.TestRunner"
+          fork="yes"
+          dir="junit_${derby.junit.timestamp}/junit-all"
+    >
+      <sysproperty key="derbyTesting.oldReleasePath" value="${derbyTesting.oldReleasePath}"/>
+      <sysproperty key="derbyTesting.oldVersionsPath" value="${derbyTesting.oldVersionsPath}"/>
+
+      <jvmarg value="--add-modules"/>
+      <jvmarg value="org.apache.derby.tests"/>
+
+      <arg value="${derby.junit.testclass}"/>
+    </java>
+  </target>
+
 <!-- =================================================================== -->
 <!--                         EMMA utility targets                        -->
 <!-- =================================================================== -->



Mime
View raw message