You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2008/10/16 16:23:59 UTC

svn commit: r705252 - /db/derby/code/trunk/build.xml

Author: myrnavl
Date: Thu Oct 16 07:23:59 2008
New Revision: 705252

URL: http://svn.apache.org/viewvc?rev=705252&view=rev
Log:
DERBY-1458; modified check for missing/orphaned messages to only run the junit
  task if the optional ant junit package is available

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=705252&r1=705251&r2=705252&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Thu Oct 16 07:23:59 2008
@@ -32,7 +32,7 @@
 <!-- Targets -->
 
   <target name="buildsource" depends="checkCompilerLevel,init,prebuild,setCompilerProperties,jsr169stubs,engine,storeless,tools,drda,client,build,versioninfo,localeinfo"/>
-  <target name="all" depends="buildsource,demo,testing,pptesting"/>
+  <target name="all" depends="buildsource,demo,testing,pptesting,runmessagecheck"/>
 
 <!-- ==================================================================== -->
 <!--                       Initialize targets                             -->
@@ -471,9 +471,28 @@
   </target>
 
   <!-- Run the MessageBundleTest -->
-  <target name="runmessagechecktest" depends="junit-init">
+    <target name="runmessagecheck" depends="checkjunittask,runmessagechecktest,nojunittask">
+  </target>
+
+  <target name="runmessagechecktest" depends="junit-init" if="optionaljunit.available">
     <property name="derby.junit.testclass" value="org.apache.derbyTesting.functionTests.tests.i18n.MessageBundleTest"/>
     <antcall target="junit-single"/>
+    <antcall target="cleanjunit"/>
+  </target>
+
+  <!-- junit.jar must be available or we couldn't build, but can we run a junit task? -->
+  <target name="checkjunittask">
+    <available property="optionaljunit.available" 
+      classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTest"/>
+  </target>
+
+  <target name="nojunittask" unless="optionaljunit.available">
+    <echo message="no junit task available; no message check run"/>
+    <antcall target="cleanjunit"/>
+  </target>
+
+  <target name="cleanjunit">
+    <delete dir="junit_${derby.junit.timestamp}"/>
   </target>
 
 <!-- ==================================================================== -->
@@ -1867,6 +1886,7 @@
     <property name="derby.junit.jvm" value="java"/>
     <property name="derby.junit.timestamp" value="${derby.junit.DSTAMP}_${derby.junit.TSTAMP}"/>
     <mkdir dir="junit_${derby.junit.timestamp}/testout"/>
+    <property name="derby.junit.timestamp" value="${derby.junit.DSTAMP}_${derby.junit.TSTAMP}"/>
   </target>
 
   <target name="junit-sysinfo" depends="junit-init">