build.xml (7f844d9f) build.xml (44cf0280)
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"
149 property="internalInstalledDirNix" value="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/installed/install/en-US/openoffice4"/>
150 <condition property="test.arg0" value="-Dopenoffice.home=${internalInstalledDirNix}">
151 <isset property="internalInstalledDirNix" />
152 </condition>
153 <available type="dir" file="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/installed/install/en-US/OpenOffice 4"
154 property="internalInstalledDirWin" value="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/installed/install/en-US/OpenOffice 4"/>
155 <condition property="test.arg0" value="-Dopenoffice.home=${internalInstalledDirWin}">
156 <isset property="internalInstalledDirWin" />
157 </condition>
158
159 <!-- 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>
160 <pathconvert property="openoffice.pack" setonempty="false">
161 <path>
162 <fileset dir="${env.SRC_ROOT}/instsetoo_native/${env.INPATH}/Apache_OpenOffice/archive/install/en-US" includes="*.tar.gz,*.zip" erroronmissingdir="false"/>
163 </path>
164 </pathconvert>
165 <condition property="test.arg0" value="-Dopenoffice.pack=${openoffice.pack}">
166 <isset property="openoffice.pack" />
167 </condition>
168
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>
169 <fail message="No OpenOffice available!" unless="test.arg0"/>
170 <condition property="test.executable" value="./run.bat">
171 <os family="windows" />
172 </condition>
173 <property name="test.executable" value="./run"/>
174 <property name="test.args" value="-tp bvt"/>
175 <exec executable="${test.executable}">
176 <arg value="${test.arg0}"/>
177 <arg line="${test.args}"/>
178 </exec>
179 </target>
180</project>