File: build-qa-functional.xml

package info (click to toggle)
netbeans-cvsclient 6.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,360 kB
  • sloc: java: 20,291; xml: 244; sh: 18; makefile: 10
file content (253 lines) | stat: -rw-r--r-- 12,084 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?xml version="1.0"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.


The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
"License"). You may not use this file except in compliance with the
License. You can obtain a copy of the License at
http://www.netbeans.org/cddl-gplv2.html
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
specific language governing permissions and limitations under the
License.  When distributing the software, include this License Header
Notice in each file and include the License file at
nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
particular file as subject to the "Classpath" exception as provided
by Sun in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the
License Header, with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

Contributor(s):

The Original Software is NetBeans. The Initial Developer of the Original
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
Microsystems, Inc. All Rights Reserved.

If you wish your version of this file to be governed by only the CDDL
or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this distribution
under the [CDDL or GPL Version 2] license." If you do not indicate a
single choice of license, a recipient has the option to distribute
your version of this file under either the CDDL, the GPL Version 2 or
to extend the choice of license to its licensees as provided above.
However, if you add GPL Version 2 code and therefore, elected the GPL
Version 2 license, then the option applies only if the new code is
made subject to such option by the copyright holder.
-->

<project name="JavaCVS qa-functional tests compilers and executors" basedir="." default="all">

    <!-- =================== -->
    <!-- Setting classpathes -->
    <!-- =================== -->

    <target name="set_classpath" depends="prepare-compile-classpath,prepare-codetest-classpath">

        <!-- During filling classpathes remember that only <module>/test
             is checked out during automated test execution so <module>/src
             or <module>/netbeans isn't available. If you need to add something
	     from <module>/src or <module>/netbeans to classpath, 
	     look below to "setting advanced claspathes" part of this target.
          -->

        <!-- XXX -->
        <property name="nbextra.dir" location="../../../nbextra"/>
        <property name="nball.dir" location="../.."/>
        <!-- List of directories where jars will be searched. -->
        <property name="jemmy.home" location="${nball.dir}/jemmy/builds"/>
        <property name="jelly.home" location="${nball.dir}/jellytools/builds"/>
        <property name="xtest.extra.jars.path" location="${jemmy.home};${jelly.home};${nball.dir}/vcscore/test/lib/"/>
    
        <!-- This jars is used for compilation, execution codetests and also for
             execution ide tests (it means this classpath will be mounted in repository).
             You can also write only name of jar or zip file, not in which directory it is and 
             this file will be searched in directories specified by property xtest.extra.jars.path 
                 example: <property name="xtest.extra.jars" value="jemmy.jar;jelly.jar"/>
          -->
        <property name="xtest.extra.jars"     value="util.jar"/>
   
        <!-- XXX -->
        <!-- These jars will be copied to directory ${netebans.home}/lib/ext.
	     Again you can write only name of jar or zip file, not in which directory it is and 
             this file will be searched in directories specified by property xtest.extra.jars.path 
                 example: <property name="xtest.extra.jars.ide" value="jdbc_driver1.zip;jdbcd_river2.jar"/>
          -->
        <property name="xtest.extra.jars.ide" value="jemmy.jar;jelly-nb.jar;jelly2-nb.jar"/>


        <!-- Arguments which will be added into commandline of starting IDE. 
                 example: <property name="xtest.ide.commandline.suffix" value="-J-Dxtest.useclassloader=org.openidex.util"/>
          -->
        <!-- XXX Used below in executor to pass start time to IDE -->
        <!-- <property name="xtest.ide.commandline.suffix" value=""/> -->
  	
        <!-- =========================== -->
        <!-- Setting avanced classpathes -->
        <!-- =========================== -->
    
        <!-- If you need to add something from <module>/src or <module>/netbeans
             to classpath use target prepare-compile-classpath or prepare-codetest-classpath
             which fills path according to property xtest.source.location. This property
             can have values "src" (compilation and execution against sources), "jar" (compil.
             and execut. against jars) or "ide" (compil. and execut. against installed IDE).
             "ide" mode is used during automated test execution so it has to be always supported. 
          -->
    
	<!-- This classpath is beside jars in xtest.extra.jars also used for compilation, 
	     but it depends on property xtest.source.location which classpath will be used.
	     Fill apropriate classpathes in targets "${xtest.source.location}compile-classath". -->
	<property name="compiletest.classpath" refid="compiletest.classpath"/>
            
	<!-- This classpath is beside jars in xtest.extra.jars also used for execution codetests,
	     but it depends on property xtest.source.location which classpath will be used.
	     Fill apropriate classpathes in targets "${xtest.source.location}test-classath". -->
	<property name="codetest.classpath" refid="codetest.classpath"/>
        
    </target>

    <!-- ========= -->
    <!-- Compilers -->
    <!-- ========= -->
    
    <target name="default-compiler" depends="set_classpath">
       <ant dir="." antfile="${xtest.module_harness.antfile}"
             target="buildtests">
           <!-- This property contains directories to compile.
    	        These directories will be compiled separately. 
                   example: <property name="compile.srcdir" value="unit/src1;unit/src2"/>
             -->
           <property name="compile.srcdir" value="qa-functional/src"/>
       </ant>
    </target>
    
    <!-- ========= -->
    <!-- Executors -->
    <!-- ========= -->
    
    <!-- This target is executed from test-executor in newly created Project -->
    <!-- Name of this task is defined in cfg-xxx.xml -->
    <!-- This target executes tests inside IDE -->
    <target name="runidetest" depends="set_classpath">
        <ant dir="." antfile="${xtest.module_harness.antfile}"
             target="test">
           <property name="xtest.exectype" value="ide"/>
           <property name="xtest.ide.winsys" value="sdi"/>
           <property name="xtest.ide.commandline.suffix" value="-J-DcvsClientLog=${xtest.sketchpad}/jcvslog -J-Dnetbeans.vcsdebug=true"/>
        </ant>
    </target>

   <!-- =============================================================
        Following targets are for "advanced" users who needs more 
        compilacated classpathes, which depends on way of execution.
        ============================================================= -->

    <!-- this "switch" will decide how to create classpath -->
    <target name="which-classpath">
        <condition property="jarcode.classpath">
            <equals arg1="${xtest.source.location}" arg2="jar"/>
        </condition>
        <condition property="srccode.classpath">
            <equals arg1="${xtest.source.location}" arg2="src"/>
        </condition>
        <condition property="idecode.classpath">
            <equals arg1="${xtest.source.location}" arg2="ide"/>
        </condition>
    </target>

    <!-- ========================= -->
    <!-- Classpath for compilation -->
    <!-- ========================= -->
    
    <target name="prepare-compile-classpath"
         depends="jarcompile-classpath,srccompile-classpath,idecompile-classpath"/>
    
    <target name="jarcompile-classpath" depends="which-classpath" if="jarcode.classpath">
        <echo message="Using jars classpath for compilation."/>
    	<!-- this classpath will be used for compiling tests against jars -->
	<path id="compiletest.classpath">        
	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="../netbeans/lib/openide.jar"/>
 	      -->
	</path>
    </target>
        
    <target name="srccompile-classpath" depends="which-classpath" if="srccode.classpath">
        <echo message="Using srcs classpath for compilation."/>
    	<!-- this classpath will be used for compiling tests against sources -->
    	<path id="compiletest.classpath">        
    	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="../netbeans/lib/openide.jar"/>
	         If you need e.g. sources of your tested module, write this:
	           <pathelement location="../src"/>
 	      -->
	     <pathelement location="../src"/>
	</path>
    </target>
    
    <target name="idecompile-classpath" depends="which-classpath" if="idecode.classpath">
        <echo message="Using IDE classpath for compilation."/>
    	<!-- this classpath will be used for compiling tests against installed IDE -->
    	<path id="compiletest.classpath">   
    	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="${netbeans.home}/lib/openide.jar"/>
	         If you need e.g. your tested module, write this:
	           <pathelement location="${netbeans.home}/modules/somemodule.jar"/>
 	      -->
            <pathelement location="${netbeans.home}/modules/org-netbeans-modules-vcscore.jar"/>
            <pathelement location="${netbeans.home}/modules/javacvs.jar"/>
            <pathelement location="${netbeans.home}/lib/openide.jar"/>
            <pathelement location="${netbeans.home}/lib/core.jar"/>
   	</path>
    </target>
    
    <!-- ================================== -->
    <!-- Classpath for execution code tests -->
    <!-- ================================== -->
    
    <target name="prepare-codetest-classpath" 
            depends="jartest-classpath,srctest-classpath,idetest-classpath"/>
    
    <target name="jartest-classpath" depends="which-classpath" if="jarcode.classpath">
        <echo message="Using jars classpath."/>
        <!-- this classpath will be used for executing tests against jars -->
	<path id="codetest.classpath">
       	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="../netbeans/lib/openide.jar"/>
 	      -->
    	</path>
    </target>
        
    <target name="srctest-classpath" depends="which-classpath" if="srccode.classpath">
        <echo message="Using srcs classpath."/>
        <!-- this classpath will be used for executing tests against sources -->
    	<path id="codetest.classpath">
	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="../netbeans/lib/openide.jar"/>
	         If you need e.g. sources of your tested module, write this:
	           <pathelement location="../src"/>
 	      -->
              <pathelement location="../src"/>
    	</path>
    </target>


    <target name="idetest-classpath" depends="which-classpath" if="idecode.classpath">
        <echo message="Using IDE classpath."/>
        <!-- this classpath will be used for executing tests against installed IDE -->
    	<path id="codetest.classpath">
	    <!-- If you need e.g. openide.jar, write this:
	           <pathelement location="${netbeans.home}/lib/openide.jar"/>
	         If you need e.g. your tested module, write this:
	           <pathelement location="${netbeans.home}/modules/somemodule.jar"/>
 	      --> 
    	</path>
    </target>
    
</project>