Browse Source

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.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1297139 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 13 years ago
parent
commit
538257ea85
1 changed files with 12 additions and 13 deletions
  1. +12
    -13
      build.xml

+ 12
- 13
build.xml View File

@@ -1921,20 +1921,19 @@ see ${build.junit.reports} / ${antunit.reports}
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" />


Loading…
Cancel
Save