1 <!--**************************************************************************** |
1 <!--**************************************************************************** |
2 * Configuration Engine (ConE) main build file |
2 * Configuration Engine (ConE) main build file |
3 * This ant build.xml will build, install and test ConE and its plugins |
3 * This ant build.xml will build, install and test ConE and its plugins |
4 ****************************************************************************--> |
4 ****************************************************************************--> |
5 <project name="ConE" |
5 |
6 default="install"> |
6 <project name="ConE" default="install"> |
7 <property file="common.properties" /> |
7 <property file="common.properties"/> |
8 <property file="linux.properties" /> |
8 <property file="linux.properties" /> |
9 <property file="windows.properties" /> |
9 <property file="windows.properties" /> |
10 <property environment="env" /> |
10 <property environment="env"/> |
11 <!-- |
11 |
|
12 <!-- |
12 Build properties, intended to be overridden from the command line |
13 Build properties, intended to be overridden from the command line |
13 where necessary. |
14 where necessary. |
14 |
15 |
15 E.g. ant install -Dbuild.build_path=C:/my/install/path -Dbuild.plugin_package=symbian |
16 E.g. ant install -Dbuild.build_path=C:/my/install/path -Dbuild.plugin_package=symbian |
16 --> |
17 --> |
17 <property name="build.plugin_package" |
18 <property name="drive" value="" /> |
18 value="common" /> |
19 <condition property="build.base_path" value="${drive}/build" else="build"> |
19 <property name="build.base_path" |
20 <and> |
20 value="build" /> |
21 <not> |
21 <property name="build.cone_install_path" |
22 <equals arg1="${drive}" arg2="" /> |
22 value="${build.base_path}/cone" /> |
23 </not> |
23 <property name="build.bat_export_path" |
24 <not> |
24 value="${build.base_path}/bat" /> |
25 <os name="${os.linux.name}" /> |
25 <property name="build.cone_pack_path" |
26 </not> |
26 value="${build.base_path}/dist" /> |
27 </and> |
27 <property name="build.bat_pack_path" |
28 </condition> |
28 value="${build.base_path}/dist" /> |
29 <condition property="build_scripts_dir" value="${drive}/${common.build_scripts_dir}" else="${common.build_scripts_dir}"> |
29 <property name="build.cone_install_path_abs" |
30 <and> |
30 location="${build.cone_install_path}" /> |
31 <not> |
31 <property name="build.bat_export_path_abs" |
32 <equals arg1="${drive}" arg2="" /> |
32 location="${build.bat_export_path}" /> |
33 </not> |
33 <property name="build.cone_pack_path_abs" |
34 <not> |
34 location="${build.cone_pack_path}" /> |
35 <os name="${os.linux.name}" /> |
35 <property name="build.bat_pack_path_abs" |
36 </not> |
36 location="${build.bat_pack_path}" /> |
37 </and> |
37 <property name="os.linux" |
38 </condition> |
38 value="Linux" /> |
39 |
39 <property name="os.windows" |
40 <property name="build.plugin_package" value="common"/> |
40 value="Windows 2003, Windows XP, Windows vista" /> |
41 <!-- <property name="build.base_path" value="build"/> --> |
41 <condition property="os_is_linux"> |
42 <property name="build.cone_install_path" value="${build.base_path}/cone"/> |
42 <os name="${os.linux}" /> |
43 <property name="build.bat_export_path" value="${build.base_path}/bat"/> |
43 </condition> |
44 <property name="build.cone_pack_path" value="${build.base_path}/dist"/> |
44 <target name="info"> |
45 <property name="build.bat_pack_path" value="${build.base_path}/dist"/> |
45 <echoproperties /> |
46 |
46 </target> |
47 <property name="build.cone_install_path_abs" location="${build.cone_install_path}"/> |
47 <!-- Aliases --> |
48 <property name="build.bat_export_path_abs" location="${build.bat_export_path}"/> |
48 <target name="install" |
49 <property name="build.cone_pack_path_abs" location="${build.cone_pack_path}"/> |
49 depends="install-cone" /> |
50 <property name="build.bat_pack_path_abs" location="${build.bat_pack_path}"/> |
50 <target name="develop" |
|
51 depends="develop-cone" /> |
|
52 <target name="test" |
|
53 depends="run-bat" /> |
|
54 <target name="doc" |
|
55 depends="doc-all" /> |
|
56 <target name="clean"> |
|
57 <delete dir="${build.cone_install_path_abs}" /> |
|
58 <delete dir="${build.bat_export_path_abs}" /> |
|
59 <delete dir="${build.cone_pack_path_abs}" /> |
|
60 <delete dir="${build.bat_pack_path_abs}" /> |
|
61 </target> |
|
62 <target name="svnversion"> |
|
63 <!-- |
51 <!-- |
|
52 <property name="os.linux.name" value="Linux" /> |
|
53 <property name="os.windows" value="Windows 2003, Windows XP, Windows vista" /> |
|
54 --> |
|
55 <property name="pythonversion" value="" /> |
|
56 |
|
57 <condition property="os_is_linux"> |
|
58 <os name="${os.linux.name}" /> |
|
59 </condition> |
|
60 <condition property="pythonversion_defined"> |
|
61 <not> |
|
62 <equals arg1="${pythonversion}" arg2="" /> |
|
63 </not> |
|
64 </condition> |
|
65 <condition property="drive_defined"> |
|
66 <not> |
|
67 <equals arg1="${drive}" arg2="" /> |
|
68 </not> |
|
69 </condition> |
|
70 <!-- Set properties based on OS --> |
|
71 <condition property="cmd_name" value="${os.linux.cmdname}" else="${os.windows.cmdname}"> |
|
72 <os name="${os.linux.name}" /> |
|
73 </condition> |
|
74 <condition property="cmd_switch" value="${os.linux.cmdswitch}" else="${os.windows.cmdswitch}"> |
|
75 <os name="${os.linux.name}" /> |
|
76 </condition> |
|
77 <condition property="env_path" value="${env.PATH}" else="${env.Path}"> |
|
78 <os name="${os.linux.name}" /> |
|
79 </condition> |
|
80 <!-- Set properties based on cmd line arguments --> |
|
81 <condition property="full_path_linux" value="${os.linux.userbin}:${env_path}" else="${env_path}"> |
|
82 <not> |
|
83 <equals arg1="${pythonversion}" arg2="" /> |
|
84 </not> |
|
85 </condition> |
|
86 <condition property="full_path_windows" value="${os.windows.pythonlocationbase}${pythonversion};${os.windows.pythonlocationbase}${pythonversion}/Scripts;${env_path}" else="${env_path}"> |
|
87 <not> |
|
88 <equals arg1="${pythonversion}" arg2="" /> |
|
89 </not> |
|
90 </condition> |
|
91 <condition property="full_path" value="${full_path_linux}" else="${full_path_windows}"> |
|
92 <os name="${os.linux.name}" /> |
|
93 </condition> |
|
94 <condition property="create_symlink"> |
|
95 <and> |
|
96 <os name="${os.linux.name}" /> |
|
97 <not> |
|
98 <equals arg1="${pythonversion}" arg2="" /> |
|
99 </not> |
|
100 </and> |
|
101 </condition> |
|
102 |
|
103 <!-- Targets --> |
|
104 <target name="info"> |
|
105 <echoproperties/> |
|
106 </target> |
|
107 |
|
108 <!-- Aliases --> |
|
109 <target name="install" depends="install-cone"/> |
|
110 <target name="develop" depends="develop-cone"/> |
|
111 <target name="test" depends="run-bat"/> |
|
112 <target name="doc" depends="doc-all"/> |
|
113 |
|
114 <target name="clean"> |
|
115 <delete dir="${build.cone_install_path_abs}"/> |
|
116 <delete dir="${build.bat_export_path_abs}"/> |
|
117 <delete dir="${build.cone_pack_path_abs}"/> |
|
118 <delete dir="${build.bat_pack_path_abs}"/> |
|
119 </target> |
|
120 |
|
121 |
|
122 <target name="svnversion"> |
|
123 <!-- |
64 Call the revision update script without the revision argument |
124 Call the revision update script without the revision argument |
65 so that the revision is reverted back to "" (this should make |
125 so that the revision is reverted back to "" (this should make |
66 it so that the working copy has no modifications and the |
126 it so that the working copy has no modifications and the |
67 revision will be e.g. "1234" instead of "1234M". |
127 revision will be e.g. "1234" instead of "1234M". |
68 --> |
128 --> |
69 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
129 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
70 <exec executable="python"> |
130 <exec executable="python"> |
71 <arg value="update_svn_revision.py" /> |
131 <arg value="update_svn_revision.py"/> |
72 <arg value="source/cone/__init__.py" /> |
132 <arg value="source/cone/__init__.py"/> |
73 </exec> |
133 </exec> |
74 <echo>Determine current working copy revision</echo> |
134 |
75 <exec executable="svnversion" |
135 <echo>Determine current working copy revision</echo> |
76 failifexecutionfails="false"> |
136 <exec executable="svnversion" failifexecutionfails="false"> |
77 <redirector outputproperty="svn.version" /> |
137 <redirector outputproperty="svn.version"/> |
78 </exec> |
138 </exec> |
79 <echo>SVN revision: ${svn.version}</echo> |
139 |
80 </target> |
140 <echo>SVN revision: ${svn.version}</echo> |
81 <target name="svninitupdate" |
141 </target> |
82 depends="svnversion"> |
142 |
83 <echo>Update SVN revision in __init__.py</echo> |
143 <target name="svninitupdate" depends="svnversion"> |
84 <exec executable="python"> |
144 <echo>Update SVN revision in __init__.py</echo> |
85 <arg value="update_svn_revision.py" /> |
145 <exec executable="python"> |
86 <arg value="source/cone/__init__.py" /> |
146 <arg value="update_svn_revision.py"/> |
87 <arg value="${svn.version}" /> |
147 <arg value="source/cone/__init__.py"/> |
88 </exec> |
148 <arg value="${svn.version}"/> |
89 </target> |
149 </exec> |
90 <target name="install-cone" |
150 </target> |
91 depends="svninitupdate"> |
151 |
92 <!-- |
152 <target name="_mount-drive" unless="os_is_linux" if="drive_defined"> |
|
153 <echo message="Mounting drive ${drive} on Windows" /> |
|
154 <exec executable="cmd"> |
|
155 <arg value="/c" /> |
|
156 <arg value="subst /D ${drive}" /> |
|
157 </exec> |
|
158 <exec executable="cmd"> |
|
159 <arg value="/c" /> |
|
160 <arg value="subst ${drive} ." /> |
|
161 </exec> |
|
162 </target> |
|
163 |
|
164 <target name="install-cone" depends="svninitupdate"> |
|
165 <!-- |
93 <echo>$${build.cone_install_path}: ${build.cone_install_path}</echo> |
166 <echo>$${build.cone_install_path}: ${build.cone_install_path}</echo> |
94 <echo>$${build.cone_install_path_abs}: ${build.cone_install_path_abs}</echo> |
167 <echo>$${build.cone_install_path_abs}: ${build.cone_install_path_abs}</echo> |
95 --> |
168 --> |
96 <!-- Run the install script in build-scripts/ --> |
169 |
97 <exec executable="python" |
170 <!-- Linux: set the correct python version --> |
98 dir="${common.build_scripts_dir}" |
171 <antcall target="_create-python-version-symlink" /> |
99 failonerror="true"> |
172 <!-- Windows: mount drive --> |
100 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' /> |
173 <antcall target="_mount-drive" /> |
101 </exec> |
174 |
102 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
175 <echo message="OS: ${os.name}" /> |
103 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
176 <echo message="Python version:" /> |
104 <exec executable="python"> |
177 <exec executable="${cmd_name}"> |
105 <arg value="update_svn_revision.py" /> |
178 <env key="PATH" path="${full_path}" /> |
106 <arg value="source/cone/__init__.py" /> |
179 <arg value="${cmd_switch}" /> |
107 </exec> |
180 <arg value="python --version"/> |
108 </target> |
181 </exec> |
109 <!-- |
182 |
110 Target for installing ConE so that it supports two Python versions. |
183 <!-- Run the install script in build-scripts/ --> |
|
184 <echo message="Run ConE install script" /> |
|
185 <exec executable="${cmd_name}" dir="${build_scripts_dir}" failonerror="true"> |
|
186 <env key="PATH" value="${full_path}" /> |
|
187 <arg value="${cmd_switch}" /> |
|
188 <arg value='python install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"'/> |
|
189 </exec> |
|
190 |
|
191 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
|
192 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
|
193 <exec executable="python"> |
|
194 <arg value="update_svn_revision.py"/> |
|
195 <arg value="source/cone/__init__.py"/> |
|
196 </exec> |
|
197 <echo message="Done" /> |
|
198 </target> |
|
199 |
|
200 <target name="build-cone" depends="svninitupdate"> |
|
201 <!-- Linux: set the correct python version --> |
|
202 <antcall target="_create-python-version-symlink" /> |
|
203 <!-- Windows: mount drive --> |
|
204 <antcall target="_mount-drive" /> |
|
205 |
|
206 <echo message="OS: ${os.name}" /> |
|
207 <echo message="Python version:" /> |
|
208 <exec executable="${cmd_name}"> |
|
209 <env key="PATH" path="${full_path}" /> |
|
210 <arg value="${cmd_switch}" /> |
|
211 <arg value="python --version"/> |
|
212 </exec> |
|
213 |
|
214 <!-- Run the install script in build-scripts/ --> |
|
215 <echo message="Run ConE install script" /> |
|
216 <exec executable="${cmd_name}" dir="${build_scripts_dir}" failonerror="true"> |
|
217 <env key="PATH" value="${full_path}" /> |
|
218 <arg value="${cmd_switch}" /> |
|
219 <arg value='python install_cone.py -i build --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"'/> |
|
220 </exec> |
|
221 |
|
222 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
|
223 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
|
224 <exec executable="python"> |
|
225 <arg value="update_svn_revision.py"/> |
|
226 <arg value="source/cone/__init__.py"/> |
|
227 </exec> |
|
228 <echo message="Done" /> |
|
229 </target> |
|
230 |
|
231 <!-- |
|
232 Internal target for installing ConE on Windows so that it supports |
|
233 two Python versions. |
111 |
234 |
112 Depends on two properties: build.dualversioninstall.path1 and |
235 Depends on two properties: build.dualversioninstall.path1 and |
113 build.dualversioninstall.path2 that must be set to the values of the PATH |
236 build.dualversioninstall.path2 that must be set to the values of the PATH |
114 environment that contains the locations of the two Python installations. |
237 environment that contains the locations of the two Python installations. |
115 --> |
238 --> |
116 <target name="install-cone-dualversion" |
239 <target name="_install-cone-dualversion-win" depends="svninitupdate" unless="os_is_linux"> |
117 depends="svninitupdate"> |
240 <!-- Run the install script using the first Python version--> |
118 <!-- Run the install script using the first Python version--> |
241 <echo>Installing with first Python version (PATH=${build.dualversioninstall.path1})</echo> |
119 <echo>Installing with first Python version (PATH=${build.dualversioninstall.path1})</echo> |
242 <exec executable="python" dir="${build_scripts_dir}" failonerror="true"> |
120 <exec executable="python" |
243 <env key="PATH" value="${build.dualversioninstall.path1}"/> |
121 dir="${common.build_scripts_dir}" |
244 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"'/> |
122 failonerror="true"> |
245 </exec> |
123 <env key="PATH" |
246 |
124 value="${build.dualversioninstall.path1}" /> |
247 <!-- Run the install script using the second Python version--> |
125 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' /> |
248 <echo>Installing with second Python version (PATH=${build.dualversioninstall.path2})</echo> |
126 </exec> |
249 <exec executable="python" dir="${build_scripts_dir}" failonerror="true"> |
127 <!-- Run the install script using the second Python version--> |
250 <env key="PATH" value="${build.dualversioninstall.path2}"/> |
128 <echo>Installing with second Python version (PATH=${build.dualversioninstall.path2})</echo> |
251 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"'/> |
129 <exec executable="python" |
252 </exec> |
130 dir="${common.build_scripts_dir}" |
253 |
131 failonerror="true"> |
254 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
132 <env key="PATH" |
255 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
133 value="${build.dualversioninstall.path2}" /> |
256 <exec executable="python"> |
134 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}"' /> |
257 <arg value="update_svn_revision.py"/> |
135 </exec> |
258 <arg value="source/cone/__init__.py"/> |
136 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
259 </exec> |
137 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
260 </target> |
138 <exec executable="python"> |
261 |
139 <arg value="update_svn_revision.py" /> |
262 <!-- |
140 <arg value="source/cone/__init__.py" /> |
263 Internal target for installing ConE on Linux so that it supports |
141 </exec> |
264 two Python versions. |
142 </target> |
265 |
143 <target name="develop-cone"> |
266 Depends on two properties: build.dualversioninstall.executable1 and |
144 <!-- Run the install script in build-scripts/ --> |
267 build.dualversioninstall.executable1 that must be set to the Python |
145 <exec executable="python" |
268 executables to run the installation (e.g. python2.5 and python2.6) |
146 dir="${common.build_scripts_dir}" |
269 --> |
147 failonerror="true"> |
270 <target name="_install-cone-dualversion-linux" depends="svninitupdate" if="os_is_linux"> |
148 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --install-type develop' /> |
271 <echo>Installing with first Python version (executable=${build.dualversioninstall.executable1})</echo> |
149 </exec> |
272 <exec executable="python" dir="${build_scripts_dir}" failonerror="true"> |
150 </target> |
273 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --python-executable="${build.dualversioninstall.executable1}"'/> |
151 <!-- |
274 </exec> |
|
275 |
|
276 <echo>Installing with second Python version (executable=${build.dualversioninstall.executable2})</echo> |
|
277 <exec executable="python" dir="${build_scripts_dir}" failonerror="true"> |
|
278 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --python-executable="${build.dualversioninstall.executable2}"'/> |
|
279 </exec> |
|
280 |
|
281 <!-- Revert the SVN revision so that it doesn't mark the working copy as modified needlessly --> |
|
282 <echo>Revert SVN revision in source/cone/__init__.py</echo> |
|
283 <exec executable="python"> |
|
284 <arg value="update_svn_revision.py"/> |
|
285 <arg value="source/cone/__init__.py"/> |
|
286 </exec> |
|
287 </target> |
|
288 |
|
289 <target name="install-cone-dualversion" depends="_install-cone-dualversion-win,_install-cone-dualversion-linux"/> |
|
290 |
|
291 <target name="develop-cone"> |
|
292 <!-- Run the install script in build-scripts/ --> |
|
293 <exec executable="python" dir="${build_scripts_dir}" failonerror="true"> |
|
294 <arg line='install_cone.py --target-dir="${build.cone_install_path_abs}" --plugin-package="${build.plugin_package}" --install-type develop'/> |
|
295 </exec> |
|
296 </target> |
|
297 |
|
298 <!-- |
152 Internal pack target for packing the ConE installation. |
299 Internal pack target for packing the ConE installation. |
153 The actual dependencies to cone-install and cone-install-dualversion are |
300 The actual dependencies to cone-install and cone-install-dualversion are |
154 specified in the actual targets below. |
301 specified in the actual targets below. |
155 --> |
302 --> |
156 <target name="_pack"> |
303 <target name="_pack"> |
157 <!-- |
304 <!-- |
158 <echo>$${build.cone_pack_path}: ${build.cone_pack_path}</echo> |
305 <echo>$${build.cone_pack_path}: ${build.cone_pack_path}</echo> |
159 <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo> |
306 <echo>$${build.cone_pack_path_abs}: ${build.cone_pack_path_abs}</echo> |
160 --> |
307 --> |
161 <echo message="Creating zip file" /> |
308 |
162 <mkdir dir="${build.cone_pack_path_abs}" /> |
309 <echo message="Creating zip file"/> |
163 <tstamp> |
310 <mkdir dir="${build.cone_pack_path_abs}"/> |
164 <format property="lastbuild" |
311 |
165 pattern="yyyyMMddHHmmss" /> |
312 <tstamp> |
166 </tstamp> |
313 <format property="lastbuild" pattern="yyyyMMddHHmmss"/> |
167 <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip"> |
314 </tstamp> |
168 <fileset dir="${build.cone_install_path_abs}" /> |
315 |
169 </zip> |
316 <zip destfile="${build.cone_pack_path_abs}/ConE-${common.version}-${build.plugin_package}-${lastbuild}-${svn.version}.zip"> |
170 </target> |
317 <fileset dir="${build.cone_install_path_abs}"/> |
171 <!-- Actual pack targets --> |
318 </zip> |
172 <target name="pack" |
319 </target> |
173 depends="install-cone"> |
320 |
174 <antcall target="_pack" /> |
321 <!-- Actual pack targets --> |
175 </target> |
322 <target name="pack" depends="install-cone"> |
176 <target name="pack-dualversion" |
323 <antcall target="_pack"/> |
177 depends="install-cone-dualversion"> |
324 </target> |
178 <antcall target="_pack" /> |
325 <target name="pack-dualversion" depends="install-cone-dualversion"> |
179 </target> |
326 <antcall target="_pack"/> |
180 <target name="export-bat"> |
327 </target> |
181 <!-- |
328 |
182 <echo>$${build.bat_export_path}: ${build.bat_export_path}</echo> |
329 |
183 <echo>$${build.bat_export_path_abs}: ${build.bat_export_path_abs}</echo> |
330 <target name="export-bat"> |
184 --> |
331 <!-- Linux: set the correct python version --> |
185 <!-- Run the export script in build-scripts/ --> |
332 <antcall target="_create-python-version-symlink" /> |
186 <exec executable="python" |
333 <!-- Run the export script in build-scripts/ --> |
187 dir="${common.build_scripts_dir}" |
334 <exec executable="${cmd_name}" dir="${build_scripts_dir}" failonerror="true"> |
188 failonerror="true"> |
335 <env key="PATH" value="${full_path}" /> |
189 <arg value="export_bat.py" /> |
336 <arg value="${cmd_switch}" /> |
190 <arg value='--target-dir="${build.bat_export_path_abs}"' /> |
337 <arg value='python export_bat.py --target-dir="${build.bat_export_path_abs}" --plugin-package="${build.plugin_package}"'/> |
191 <arg value='--plugin-package="${build.plugin_package}"' /> |
338 </exec> |
192 </exec> |
339 </target> |
193 </target> |
340 |
194 <target name="pack-bat" |
341 <target name="pack-bat" depends="export-bat"> |
195 depends="export-bat"> |
342 <echo message="Creating zip file"/> |
196 <echo message="Creating zip file" /> |
343 <mkdir dir="${build.bat_pack_path_abs}"/> |
197 <mkdir dir="${build.bat_pack_path_abs}" /> |
344 |
198 <zip destfile="${build.bat_pack_path_abs}/ConE-BAT-${build.plugin_package}.zip"> |
345 <zip destfile="${build.bat_pack_path_abs}/ConE-BAT-${build.plugin_package}.zip"> |
199 <fileset dir="${build.bat_export_path_abs}" /> |
346 <fileset dir="${build.bat_export_path_abs}"/> |
200 </zip> |
347 </zip> |
201 </target> |
348 </target> |
202 <target name="run-bat" |
349 |
203 depends="install-cone,export-bat"> |
350 <!-- Linux: Create a symbolic link to the Python version used --> |
204 <echo message="Moving ConE installation under BAT..." /> |
351 <target name="_create-python-version-symlink" if="create_symlink"> |
205 <move todir="${build.bat_export_path_abs}/cone"> |
352 <echo message="Change Python version on Linux" /> |
206 <fileset dir="${build.cone_install_path_abs}" /> |
353 <echo message="Deleting old symlink"/> |
207 </move> |
354 <delete file="${os.linux.userbin}/python" /> |
208 <echo message="Running tests..." /> |
355 <echo message="ln -s -f /usr/bin/${pythonversion} ${os.linux.userbin}/python" /> |
209 <exec executable="python" |
356 <exec executable="ln"> |
210 dir="${build.bat_export_path_abs}"> |
357 <arg value="-s" /> |
211 <arg value="runtests.py" /> |
358 <arg value="-f" /> |
212 </exec> |
359 <arg value="/usr/bin/${pythonversion}" /> |
213 </target> |
360 <arg value="${os.linux.userbin}/python" /> |
214 <target name="run-all-tests"> |
361 </exec> |
215 <echo message="Run all tests" /> |
362 </target> |
216 <echo message="OS: ${os.name}" /> |
363 |
217 <echo message="Python version: ${pythonversion}" /> |
364 <target name="run-bat" depends="install-cone, export-bat"> |
218 <subant buildpath="." |
365 <echo message="Running BAT tests..."/> |
219 target="run-all-tests-linux" /> |
366 |
220 <subant buildpath="." |
367 <echo message="Moving ConE installation under BAT..."/> |
221 target="run-all-tests-windows" /> |
368 <move todir="${build.bat_export_path_abs}/cone"> |
222 </target> |
369 <fileset dir="${build.cone_install_path_abs}"/> |
223 <target name="run-all-tests-linux" |
370 </move> |
224 if="os_is_linux"> |
371 |
225 <echo message="Change Python version" /> |
372 <exec executable="${cmd_name}" dir="${build.bat_export_path_abs}"> |
226 <echo message="ln -s -f /usr/bin/${pythonversion} ${os.linux.userbin}/python" /> |
373 <env key="PATH" path="${full_path}" /> |
227 <exec executable="ln"> |
374 <arg value="${cmd_switch}" /> |
228 <arg value="-s" /> |
375 <arg value="python runtests.py --with-nose"/> |
229 <arg value="-f" /> |
376 </exec> |
230 <arg value="/usr/bin/${pythonversion}" /> |
377 </target> |
231 <arg value="${os.linux.userbin}/python" /> |
378 |
232 </exec> |
379 |
233 <echo message="Python version:" /> |
380 <target name="run-all-tests" depends="build-cone"> |
234 <exec executable="sh" |
381 <echo message="Run all tests" /> |
235 dir="./source"> |
382 <echo message="OS: ${os.name}" /> |
236 <env key="PATH" |
383 <!-- Linux: Set the correct Python version --> |
237 path="${os.linux.userbin}:${env.PATH}" /> |
384 <antcall target="_create-python-version-symlink" /> |
238 <arg value="-c" /> |
385 |
239 <arg value="python --version" /> |
386 <echo message="Python version:" /> |
240 </exec> |
387 <exec executable="${cmd_name}" dir="./source"> |
241 <echo message="Run tests" /> |
388 <env key="PATH" path="${full_path}" /> |
242 <exec executable="sh" |
389 <arg value="${cmd_switch}" /> |
243 dir="./source"> |
390 <arg value="python --version" /> |
244 <env key="PATH" |
391 </exec> |
245 path="${os.linux.userbin}:${env.PATH}" /> |
392 <echo message="Run tests" /> |
246 <arg value="-c" /> |
393 <exec executable="${cmd_name}" dir="./source"> |
247 <arg value="python runtests.py --with-nose" /> |
394 <env key="PATH" path="${full_path}" /> |
248 </exec> |
395 <env key="PYTHONPATH" path="${cone_python_path}" /> |
249 </target> |
396 <arg value="${cmd_switch}" /> |
250 <target name="run-all-tests-windows" |
397 <arg value="python runtests.py" /> |
251 unless="os_is_linux"> |
398 </exec> |
252 <echo message="Change Python version" /> |
399 </target> |
253 <echo message="Python version:" /> |
400 |
254 <exec executable="cmd"> |
401 <import file="generatedoc-build.xml"/> |
255 <env key="PATH" |
|
256 path="${os.windows.pythonlocationbase}${pythonversion};${os.windows.pythonlocationbase}${pythonversion}/Scripts;${env.PATH}" /> |
|
257 <arg value="/c" /> |
|
258 <arg value="python --version" /> |
|
259 </exec> |
|
260 <echo message="Run tests" /> |
|
261 <exec executable="cmd" |
|
262 dir="./source"> |
|
263 <env key="PATH" |
|
264 path="${os.windows.pythonlocationbase}${pythonversion};${os.windows.pythonlocationbase}${pythonversion}/Scripts;${env.PATH}" /> |
|
265 <arg value="/c" /> |
|
266 <arg value="python runtests.py --with-nose" /> |
|
267 </exec> |
|
268 </target> |
|
269 <import file="generatedoc-build.xml" /> |
|
270 </project> |
402 </project> |