build.xml (864de7b8) build.xml (eb07ef5f)
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

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

134 <target name="dist" depends="clean,compile">
135 <tstamp/>
136 <zip destfile="${dist.dir}/${dist.name}_${DSTAMP}.zip" update="false">
137 <zipfileset dir="." includes="lib/**, testcommon/**,testgui/**,testuno/**,build.xml,run,run.bat" filemode="751" prefix="aoo_test/"/>
138 </zip>
139 </target>
140
141 <target name="test" depends="compile" description="start test">
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

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

134 <target name="dist" depends="clean,compile">
135 <tstamp/>
136 <zip destfile="${dist.dir}/${dist.name}_${DSTAMP}.zip" update="false">
137 <zipfileset dir="." includes="lib/**, testcommon/**,testgui/**,testuno/**,build.xml,run,run.bat" filemode="751" prefix="aoo_test/"/>
138 </zip>
139 </target>
140
141 <target name="test" depends="compile" description="start test">
142 <!-- Try the specified ${openoffice.home} first -->
142 <condition property="test.arg0" value="-Dopenoffice.home=${openoffice.home}">
143 <isset property="openoffice.home" />
144 </condition>
143 <condition property="test.arg0" value="-Dopenoffice.home=${openoffice.home}">
144 <isset property="openoffice.home" />
145 </condition>
146
147 <!-- Next try the internal install path that the with-package-format=installed option to configure uses -->
148 <available type="dir" file="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/installed/install/en-US/openoffice4/program"
149 property="internalInstalledDir" value="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/installed/install/en-US/openoffice4/program"/>
150 <condition property="test.arg0" value="-Dopenoffice.home=${internalInstalledDir}">
151 <isset property="internalInstalledDir" />
152 </condition>
153
154 <!-- Finally try the tar.gz and zip archives which build by default -->
145 <pathconvert property="openoffice.pack" setonempty="false">
146 <path>
147 <fileset dir="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/archive/install/en-US" includes="*.tar.gz,*.zip" erroronmissingdir="false"/>
148 </path>
149 </pathconvert>
150 <condition property="test.arg0" value="-Dopenoffice.pack=${openoffice.pack}">
151 <isset property="openoffice.pack" />
152 </condition>
155 <pathconvert property="openoffice.pack" setonempty="false">
156 <path>
157 <fileset dir="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/archive/install/en-US" includes="*.tar.gz,*.zip" erroronmissingdir="false"/>
158 </path>
159 </pathconvert>
160 <condition property="test.arg0" value="-Dopenoffice.pack=${openoffice.pack}">
161 <isset property="openoffice.pack" />
162 </condition>
163
153 <fail message="No OpenOffice available!" unless="test.arg0"/>
154 <condition property="test.executable" value="./run.bat">
155 <os family="windows" />
156 </condition>
157 <property name="test.executable" value="./run"/>
158 <property name="test.args" value="-tp bvt"/>
159 <exec executable="${test.executable}">
160 <arg value="${test.arg0}"/>
161 <arg line="${test.args}"/>
162 </exec>
163 </target>
164</project>
164 <fail message="No OpenOffice available!" unless="test.arg0"/>
165 <condition property="test.executable" value="./run.bat">
166 <os family="windows" />
167 </condition>
168 <property name="test.executable" value="./run"/>
169 <property name="test.args" value="-tp bvt"/>
170 <exec executable="${test.executable}">
171 <arg value="${test.arg0}"/>
172 <arg line="${test.args}"/>
173 </exec>
174 </target>
175</project>