You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jg...@apache.org on 2012/02/24 16:30:01 UTC

svn commit: r1293295 - /ant/core/trunk/build.xml

Author: jglick
Date: Fri Feb 24 15:30:01 2012
New Revision: 1293295

URL: http://svn.apache.org/viewvc?rev=1293295&view=rev
Log:
Fail promptly if antunit-tests is run with some random version of Ant, since this would not be testing the sources in this tree.

Modified:
    ant/core/trunk/build.xml

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?rev=1293295&r1=1293294&r2=1293295&view=diff
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Fri Feb 24 15:30:01 2012
@@ -76,7 +76,7 @@
        ===================================================================
   -->
   <property name="build.dir" value="build"/>
-  <property name="bootstrap.dir" value="bootstrap"/>
+  <property name="bootstrap.dir" location="bootstrap"/>
   <property name="build.classes" value="${build.dir}/classes"/>
   <property name="build.lib" value="${build.dir}/lib"/>
   <property name="build.lib-src" value="${build.dir}/lib-src"/>
@@ -150,7 +150,7 @@
   <property name="dist.base.source" value="${dist.base}/source"/>
   <property name="dist.base.binaries" value="${dist.base}/binaries"/>
   <property name="dist.base.manual" value="${dist.base}/manual"/>
-  <property name="dist.dir" value="dist"/>
+  <property name="dist.dir" location="dist"/>
   <property name="dist.bin" value="${dist.dir}/bin"/>
   <property name="dist.lib" value="${dist.dir}/lib"/>
   <property name="dist.manual" value="${dist.dir}/manual"/>
@@ -1924,6 +1924,17 @@ see ${build.junit.reports} / ${antunit.r
   <target name="antunit-tests" depends="dump-info,build,test-init"
           if="run.antunit" description="--> run the antunit tests">
 
+    <fail message="AntUnit tests must be run with ${bootstrap.dir} (or ${dist.dir}), not ${ant.home}. Try './build.sh antunit-tests' for example.">
+      <condition>
+        <not>
+          <or>
+            <equals arg1="${ant.home}" arg2="${bootstrap.dir}"/>
+            <equals arg1="${ant.home}" arg2="${dist.dir}"/>
+          </or>
+        </not>
+      </condition>
+    </fail>
+
     <condition property="antunit.includes" value="${antunit.testcase}"
                else="**/test.xml,**/*-test.xml">
       <isset property="antunit.testcase" />