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/03/05 18:34:16 UTC

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

Author: jglick
Date: Mon Mar  5 17:34:15 2012
New Revision: 1297139

URL: http://svn.apache.org/viewvc?rev=1297139&view=rev
Log:
Weaken antunit location message to warning.
Otherwise it can incorrectly fail due to canonicalization differences.
https://builds.apache.org/job/Ant_JDK_1.5_Test/453/console
antunit-tests:
BUILD FAILED
/zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/Ant_JDK_1.5_Test/trunk/build.xml:1927: AntUnit tests must be run with /zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/Ant_JDK_1.5_Test/trunk/bootstrap (or /zonestorage/hudson_solaris/home/hudson/hudson-slave/workspace/Ant_JDK_1.5_Test/trunk/dist), not /export/home/hudson/hudson-slave/workspace/Ant_JDK_1.5_Test/trunk/bootstrap. Try './build.sh antunit-tests' for example.

Modified:
    ant/core/trunk/build.xml

Modified: ant/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/build.xml?rev=1297139&r1=1297138&r2=1297139&view=diff
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Mon Mar  5 17:34:15 2012
@@ -1921,20 +1921,19 @@ see ${build.junit.reports} / ${antunit.r
       fork="true"/>
   </target>
 
-  <target name="antunit-tests" depends="dump-info,build,test-init"
+  <target name="-antunit-check-location">
+    <condition property="antunit.recommended.location">
+      <or>
+        <equals arg1="${ant.home}" arg2="${bootstrap.dir}"/>
+        <equals arg1="${ant.home}" arg2="${dist.dir}"/>
+      </or>
+    </condition>
+  </target>
+  <target name="-antunit-warn-location" depends="-antunit-check-location" unless="${antunit.recommended.location}">
+      <echo>AntUnit tests must be run with ${bootstrap.dir} (or ${dist.dir}), not ${ant.home}. Try './build.sh antunit-tests' for example.</echo>
+  </target>
+  <target name="antunit-tests" depends="dump-info,build,test-init,-antunit-warn-location"
           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" />