You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2006/07/12 01:33:26 UTC
svn commit: r421028 - /db/ojb/branches/OJB_1_0_RELEASE/build.xml
Author: arminw
Date: Tue Jul 11 16:33:25 2006
New Revision: 421028
URL: http://svn.apache.org/viewvc?rev=421028&view=rev
Log:
add target to build test jar for OJB-117 test case, add specific junit classpath
Modified:
db/ojb/branches/OJB_1_0_RELEASE/build.xml
Modified: db/ojb/branches/OJB_1_0_RELEASE/build.xml
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/build.xml?rev=421028&r1=421027&r2=421028&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/build.xml (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/build.xml Tue Jul 11 16:33:25 2006
@@ -63,6 +63,13 @@
<path refid="compilation-classpath"/>
</path>
+ <!-- classpath used for OJB's test suite -->
+ <path id="junit-classpath">
+ <path refid="runtime-classpath"/>
+ <!-- this jar was used in OJB's test suite -->
+ <pathelement path="${build.test}/tmp/test-res.jar"/>
+ </path>
+
<property name="runtime.classpath" refid="runtime-classpath"/>
@@ -1242,7 +1249,36 @@
<zip zipfile="${dist}/${archive}-maven-dist.zip"
basedir="${build.mavendist}"/>
- </target>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- create jar resource for a specific test in OJB's test-suite -->
+ <!-- =================================================================== -->
+ <target name="prepare-test-suite" description="Prepare OJB's test suite">
+ <property name="res.src" value="${src.test}/org/apache/ojb"/>
+ <property name="res.tmp.dir" value="${build.test}/tmp"/>
+ <property name="res.jar.name" value="test-res.jar" />
+ <property name="res.jar.dir" value="${res.tmp.dir}" />
+
+ <delete dir="${res.tmp.dir}" />
+ <mkdir dir="${res.tmp.dir}" />
+ <mkdir dir="${res.tmp.dir}/tmp" />
+
+ <copy todir="${res.tmp.dir}/tmp">
+ <fileset dir="${res.src}">
+ <include name="repository.dtd Test_Repository_Renamed_DTD.xml"/>
+ </fileset>
+ </copy>
+ <copy file="${res.src}/repository.dtd" tofile="${res.jar.dir}/tmp/test_renamed_repository.dtd"/>
+ <copy file="${res.src}/Test_Repository_Renamed_DTD.xml" todir="${res.jar.dir}/tmp"/>
+
+ <jar jarfile="${res.jar.dir}/tmp/${res.jar.name}"
+ basedir="${res.jar.dir}/tmp">
+ </jar>
+
+ <copy file="${res.jar.dir}/tmp/${res.jar.name}" todir="${res.jar.dir}"/>
+ <delete dir="${res.tmp.dir}/tmp" />
+ </target>
<!-- ================================================================== -->
<!-- Perform JUnit Tests -->
@@ -1251,9 +1287,9 @@
description="Performs all JUnit regression tests."/>
<!-- property 'test.package' has to be set at command line -->
- <target name="run-test" depends="prepare-repository, copy-testdb">
+ <target name="run-test" depends="prepare-repository, copy-testdb, prepare-test-suite">
<junit printsummary="yes" showoutput="true" fork="yes" dir="${build.test}/ojb">
- <classpath refid="runtime-classpath"/>
+ <classpath refid="junit-classpath"/>
<formatter type="plain" />
<test name="${test.package}"
haltonfailure="no"
@@ -1264,14 +1300,14 @@
</target>
<target name="junit-no-compile"
- depends="prepare, prepare-testdb, junit-no-compile-no-prepare,junit-no-compile-no-prepare-selected"
+ depends="prepare, prepare-testdb, prepare-test-suite, junit-no-compile-no-prepare,junit-no-compile-no-prepare-selected"
/>
<target name="junit-no-compile-no-prepare" unless="ojb.testsToRun">
<junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
<jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
- <classpath refid="runtime-classpath"/>
+ <classpath refid="junit-classpath"/>
<formatter type="plain" />
<formatter type="xml" />
@@ -1301,7 +1337,7 @@
<junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
<jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
- <classpath refid="runtime-classpath"/>
+ <classpath refid="junit-classpath"/>
<formatter type="plain" />
<formatter type="xml" />
@@ -1334,7 +1370,7 @@
<target name="junit-sqlcount-no-compile-no-prepare" depends="checkP6Spy" if="shouldUseP6Spy">
<junit printsummary="yes" fork="yes" dir="${build.test}/ojb">
<jvmarg value="-DOJB.skip.issues=${OJB.skip.issues}" />
- <classpath refid="runtime-classpath"/>
+ <classpath refid="junit-classpath"/>
<formatter type="plain" />
<formatter type="xml" />
<test name="org.apache.ojb.broker.sqlcount.AllTests"
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org