db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r705252 - /db/derby/code/trunk/build.xml
Date Thu, 16 Oct 2008 14:23:59 GMT
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">



Mime
View raw message