~russel/gant/trunk

« back to all changes in this revision

Viewing changes to src/integTest/groovy/org/codehaus/gant/ant/tests/gantTest.xml

  • Committer: Russel Winder
  • Date: 2010-04-05 19:18:32 UTC
  • Revision ID: git-v1:51134388f223d6e4bc983bbf209bb572df68f40d
In order for the Gant Ant task tests that spawn an Ant instance to run successfully, the version of Ant used must be the same as the Ant jar used by the Gradle classpath.  To date the tests have worked successfully when run locally by RW but have been failing on Codehaus Bamboo.  The chosen solution is to partition the tests so that only those tests that are not spawning an Ant instance are run as unit tests and those tests that do run an Ant instance are categorized as integration tests and not run as part of continuous integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
 
 
3
<!--
 
4
   Gant - A Groovy way of scripting Ant tasks.
 
5
 
 
6
   Copyright © 2008-10 Russel Winder
 
7
 
 
8
   Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
 
9
   compliance with the License. You may obtain a copy of the License at
 
10
 
 
11
   http://www.apache.org/licenses/LICENSE-2.0
 
12
 
 
13
   Unless required by applicable law or agreed to in writing, software distributed under the License is
 
14
   distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 
15
   implied. See the License for the specific language governing permissions and limitations under the
 
16
   License.
 
17
  
 
18
   Author : Russel Winder <russel@russel.org.uk>
 
19
-->
 
20
 
 
21
<project name="Gant Ant Task Test" default="gantTestDefaultFileDefaultTarget" basedir=".">
 
22
 
 
23
  <import file="commonBits.xml"/>
 
24
 
 
25
  <target name="gantTestDefaultFileDefaultTarget" depends="-defineGantTask">
 
26
    <gant/>
 
27
  </target>
 
28
 
 
29
  <target name="gantTestDefaultFileNamedTarget" depends="-defineGantTask">
 
30
    <gant target="blah"/>
 
31
  </target>
 
32
 
 
33
 <target name="gantTestNamedFileDefaultTarget" depends="-defineGantTask">
 
34
    <gant file="build.gant"/>
 
35
  </target>
 
36
 
 
37
  <target name="gantTestNamedFileNamedTarget" depends="-defineGantTask">
 
38
    <gant file="build.gant" target="blah"/>
 
39
  </target>
 
40
 
 
41
  <!--  Ensure there is no file of the name used in the Gant Ant task here. -->
 
42
  <target name="missingGantfile" depends="-defineGantTask">
 
43
    <gant file="blahBlahBlahBlah.blah"/>
 
44
  </target>
 
45
 
 
46
  <!--  Ensure there is no target called blahBlahBlahBlah. -->
 
47
  <target name="gantTaskdefVerifyError" depends="-defineGantTask">
 
48
    <gant file="build.gant" target="gantTaskdefVerifyError"/>
 
49
  </target>
 
50
 
 
51
  <target name="gantWithParametersAsNestedTags" depends="-defineGantTask">
 
52
    <gant file="build.gant" target="gantParameters">
 
53
      <definition name="flob" value="adob"/>
 
54
      <definition name="burble"/>
 
55
    </gant>
 
56
  </target>
 
57
 
 
58
  <target name="gantWithMultipleTargets" depends="-defineGantTask">
 
59
    <gant>
 
60
      <gantTarget value="test"/>
 
61
      <gantTarget value="blah"/>
 
62
    </gant>
 
63
  </target>
 
64
 
 
65
  <!-- For GANT-110.  Thanks to Eric Van Dewoestine for providing this. -->
 
66
 
 
67
  <target name="gantTestInheritAll" depends="-defineGantTask">
 
68
    <property name="gant.test.inheritAll" value="gantInheritAllWorks"/>
 
69
    <gant file="build.gant" target="gantInheritAll"/>
 
70
    <gant file="build.gant" target="gantInheritAll" inheritAll="false"/>
 
71
    <gant file="build.gant" target="gantInheritAll" inheritAll="true"/>
 
72
  </target>
 
73
  
 
74
  <!-- For GANT-111.  Thanks to Eric Van Dewoestine for providing this. -->
 
75
 
 
76
  <target name="gantTestFail" depends="-defineGantTask">
 
77
    <gant file="build.gant" target="testFail"/>
 
78
  </target>
 
79
  
 
80
</project>