build.xml (e6e6073d) build.xml (d7740c70)
1<?xml version="1.0"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 19 unchanged lines hidden (view full) ---

28 <property name="env.DISPLAY" value=":0.0"/>
29 <property name="env.INPATH" value="testspace"/>
30 <property name="env.TESTSPACE" value="${env.INPATH}" />
31 <property name="env.JUNIT_HOME" value="external/junit" />
32 <property name="junit.home" value="${env.JUNIT_HOME}" />
33 <property name="testspace" value="${env.TESTSPACE}" />
34 <property name="classes" value="${testspace}/class" />
35 <property name="dist" value="." />
1<?xml version="1.0"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 19 unchanged lines hidden (view full) ---

28 <property name="env.DISPLAY" value=":0.0"/>
29 <property name="env.INPATH" value="testspace"/>
30 <property name="env.TESTSPACE" value="${env.INPATH}" />
31 <property name="env.JUNIT_HOME" value="external/junit" />
32 <property name="junit.home" value="${env.JUNIT_HOME}" />
33 <property name="testspace" value="${env.TESTSPACE}" />
34 <property name="classes" value="${testspace}/class" />
35 <property name="dist" value="." />
36 <property name="test.name" value="BVT" />
36 <property name="test.classes" value="testcase/gui/bvt/*.class" />
37 <property name="test.output" value="${testspace}/output" />
38 <property name="test.result" value="${test.output}/result" />
39 <property name="test.report" value="${test.output}/report" />
40 <property name="junit.style.dir" value="reportstyle" />
41
42 <path id="junit.classpath">
43 <fileset dir="${junit.home}" erroronmissingdir="false">

--- 159 unchanged lines hidden (view full) ---

203 </fileset>
204 </unzip>
205 <pathconvert property="gz.files" pathsep=" " setonempty="false">
206 <path>
207 <fileset dir="${openoffice.archive.dir}" includes="Apache_OpenOffice*.gz" />
208 </path>
209 </pathconvert>
210 <exec dir="${openoffice.installation.dest}" executable="tar" failifexecutionfails="false">
37 <property name="test.classes" value="testcase/gui/bvt/*.class" />
38 <property name="test.output" value="${testspace}/output" />
39 <property name="test.result" value="${test.output}/result" />
40 <property name="test.report" value="${test.output}/report" />
41 <property name="junit.style.dir" value="reportstyle" />
42
43 <path id="junit.classpath">
44 <fileset dir="${junit.home}" erroronmissingdir="false">

--- 159 unchanged lines hidden (view full) ---

204 </fileset>
205 </unzip>
206 <pathconvert property="gz.files" pathsep=" " setonempty="false">
207 <path>
208 <fileset dir="${openoffice.archive.dir}" includes="Apache_OpenOffice*.gz" />
209 </path>
210 </pathconvert>
211 <exec dir="${openoffice.installation.dest}" executable="tar" failifexecutionfails="false">
211 <arg line="-zxf ${gz.files}" />
212 <arg line="-zxpf ${gz.files}" />
212 </exec>
213
214 <pathconvert property="openoffice.12.dir" pathsep=" " setonempty="false">
215 <path>
216 <dirset dir="${openoffice.installation.dest}">
217 <include name="*"/>
218 </dirset>
219 </path>

--- 53 unchanged lines hidden (view full) ---

273 </junitreport>
274 <property name="test.report.index" location="${test.report}/index.html" />
275 <echo>Open ${test.report.index} in browser to view the test report.</echo>
276 </target>
277
278 <target name="test" depends="check.build,find.build,download.build,install.build,run.test" description="Run testing on the specified build. The build is automatically downloaded and installed according to the context.">
279 <fail message="Test Failed" if="test.failed" />
280 </target>
213 </exec>
214
215 <pathconvert property="openoffice.12.dir" pathsep=" " setonempty="false">
216 <path>
217 <dirset dir="${openoffice.installation.dest}">
218 <include name="*"/>
219 </dirset>
220 </path>

--- 53 unchanged lines hidden (view full) ---

274 </junitreport>
275 <property name="test.report.index" location="${test.report}/index.html" />
276 <echo>Open ${test.report.index} in browser to view the test report.</echo>
277 </target>
278
279 <target name="test" depends="check.build,find.build,download.build,install.build,run.test" description="Run testing on the specified build. The build is automatically downloaded and installed according to the context.">
280 <fail message="Test Failed" if="test.failed" />
281 </target>
282
283 <target name="detect.testenv" unless="report.test.skip">
284 <exec outputproperty="test.os.name" executable="lsb_release" failifexecutionfails="false" os="linux">
285 <arg line="-is" />
286 </exec>
287 <exec outputproperty="test.os.version" executable="lsb_release" failifexecutionfails="false" os="linux">
288 <arg line="-rs" />
289 </exec>
290 <property name="test.os.name" value="${os.name}" />
291 <property name="test.os.version" value="${os.version}" />
292 <property name="test.os.arch" value="${os.arch}" />
293 <echo>${test.os.name}-${test.os.version}-${test.os.arch}</echo>
294 </target>
281
295
282 <target name="report.test" unless="report.test.skip" description="Upload the testing result to report repository.">
283 <property name="report.to" value="r${openoffice.Revision}/${os.name}-${os.version}-${os.arch}" />
296
297 <target name="report.test" unless="report.test.skip" description="Upload the testing result to report repository." depends="detect.testenv">
298 <property name="report.to" value="r${openoffice.Revision}/${test.name}/${test.os.name}-${test.os.version}-${test.os.arch}" />
284 <echo>Uploading report to ${report.repos}/${report.to}</echo>
285 <property name="report.to.temp" location="${testspace}/.temp.ouput"/>
286 <delete dir="${report.to.temp}" deleteonexit="true"/>
287 <copy todir="${report.to.temp}/${report.to}">
288 <fileset dir="${test.output}" />
289 </copy>
290 <scp todir="${report.repos}" trust="true">
291 <fileset dir="${report.to.temp}"/>
292 </scp>
293 <delete dir="${report.to.temp}" deleteonexit="true"/>
294 </target>
295
296 <target name="detect.build" depends="find.build" description="Check if new build is available. If no new build is available, the target will be failed.">
299 <echo>Uploading report to ${report.repos}/${report.to}</echo>
300 <property name="report.to.temp" location="${testspace}/.temp.ouput"/>
301 <delete dir="${report.to.temp}" deleteonexit="true"/>
302 <copy todir="${report.to.temp}/${report.to}">
303 <fileset dir="${test.output}" />
304 </copy>
305 <scp todir="${report.repos}" trust="true">
306 <fileset dir="${report.to.temp}"/>
307 </scp>
308 <delete dir="${report.to.temp}" deleteonexit="true"/>
309 </target>
310
311 <target name="detect.build" depends="find.build" description="Check if new build is available. If no new build is available, the target will be failed.">
297 <loadfile property="local.build" srcFile="${testspace}/build.txt" quiet="true" failonerror="false" />
312 <property name="test.mark.file" location="${testspace}/${test.name}.build"/>
313 <loadfile property="local.build" srcFile="${test.mark.file}" quiet="true" failonerror="false" />
298 <fail message="The build has been tested! We don't want to test it twice.">
299 <condition>
300 <equals arg1="${openoffice.build}" arg2="${local.build}" trim="true" />
301 </condition>
302 </fail>
303 <mkdir dir="${testspace}" />
314 <fail message="The build has been tested! We don't want to test it twice.">
315 <condition>
316 <equals arg1="${openoffice.build}" arg2="${local.build}" trim="true" />
317 </condition>
318 </fail>
319 <mkdir dir="${testspace}" />
304 <echo file="${testspace}/build.txt">${openoffice.build}</echo>
320 <echo file="${test.mark.file}">${openoffice.build}</echo>
305 </target>
306
307 <target name="routine.test" depends="detect.build,download.build,install.build,run.test,report.test" description="Periodically run testing.">
308 <fail message="Test Failed" if="test.failed" />
309 </target>
310</project>
321 </target>
322
323 <target name="routine.test" depends="detect.build,download.build,install.build,run.test,report.test" description="Periodically run testing.">
324 <fail message="Test Failed" if="test.failed" />
325 </target>
326</project>