tests.xml revision 7e53a70ee255f062e8456215ea13967621d9c60a
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan<!--
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! CDDL HEADER START
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! The contents of this file are subject to the terms of the
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! Common Development and Distribution License, Version 1.0 only
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! (the "License"). You may not use this file except in compliance
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! with the License.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! You can obtain a copy of the license at
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! See the License for the specific language governing permissions
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! and limitations under the License.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
923784d59ac065eee98b208dfacda6fbc24c71d6Jake Feasel ! When distributing Covered Code, include this CDDL HEADER in each
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! file and include the License file at
4eb529f0471672590d77cf89ef23987ba2c95ff4Laszlo Hordos ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
4eb529f0471672590d77cf89ef23987ba2c95ff4Laszlo Hordos ! add the following below this CDDL HEADER, with the fields enclosed
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! by brackets "[]" replaced with your own identifying information:
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! Portions Copyright [yyyy] [name of copyright owner]
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan ! CDDL HEADER END
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan !
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel ! Copyright 2008-2010 Sun Microsystems, Inc.
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel ! -->
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel<project name="tests">
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel
7c64421614d420f1951773af3ce6a6111cef84b2Jake Feasel <description>
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan Execute the tests.
54f30b716553d88ea9ebb010037f4c74eb1d69acPaul Bryan </description>
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <target name="specs">
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <javac srcdir="${shared.dir}/java/parsingtool"
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos destdir="${shared.dir}/java/parsingtool"
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos debug="true"
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos debuglevel="lines,vars,source"
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos verbose="yes"
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos />
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <delete dir="${logs.dir}/specs" failonerror="false"/>
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <mkdir dir="${logs.dir}/specs"/>
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <java classpath="${shared.dir}/java/parsingtool"
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos classname="GenerateOpenDSTestSpecs" fork="true">
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <!-- uncomment "agentlib" if need debugger waiting for you
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <jvmarg value="-agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=7778"/>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos -->
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos <arg value="${tests.dir}"/>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <arg value="${logs.dir}/specs"/>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <arg value="xml" />
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos </java>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos </target>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <target name="run">
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <tstamp>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <format property="tests.timestamp" pattern="yyyyMMdd-HHmmss"/>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos </tstamp>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos <var name="tests.run.time" value="${remote.hostname}-${tests.timestamp}"/>
8166b048bd3e2106dbdeaa1a2b8a728952d788f4Laszlo Hordos
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan <!-- clean up tmp dir -->
a14db14686bf9f6817c47e5c14e887d74dd615f0Laszlo Hordos <if>
65dca54148fd203f9c97a0fa41f5335c260fecabChris Drake <equals arg1="${tests.mode}" arg2="local"/>
f85a185a657def022f6d8896cc755403f7d40694Andi Egloff <then>
a14db14686bf9f6817c47e5c14e887d74dd615f0Laszlo Hordos <delete dir="${tests.tmp.dir}"/>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin <mkdir dir="${tests.tmp.dir}"/>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin </then>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin </if>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin
00689490237ac7e37aa116d443e4e5882c5552dcMatthias Tristl <!-- make all the necessary directories for this test run -->
00689490237ac7e37aa116d443e4e5882c5552dcMatthias Tristl <mkdir dir="${tests.run.dir}/${tests.run.time}"/>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin <mkdir dir="${tests.run.dir}/${tests.run.time}/config"/>
2d7019e19039fd083850f76e54b6b26a7b06a8f2yaromin <!-- these will serve for after-the-fact archiving the logs -->
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <mkdir dir="${tests.run.dir}/${tests.run.time}/staf-logs"/>
00689490237ac7e37aa116d443e4e5882c5552dcMatthias Tristl <mkdir dir="${tests.run.dir}/${tests.run.time}/logs"/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <if>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <equals arg1="${test.plan.custom}" arg2=""/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <then>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <if>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <equals arg1="${tests.type}" arg2="functional-tests"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <var name="test.plan.custom" value="${test.plan.functional.default}"/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </then>
00689490237ac7e37aa116d443e4e5882c5552dcMatthias Tristl <else>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <var name="test.plan.custom" value="${test.plan.stress.default}"/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </else>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </if>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </then>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </if>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <!-- generate the config file that will be used for this run -->
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <copy file="${tests.config.stubs}"
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos tofile="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}">
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <filterchain>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <expandproperties/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </filterchain>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </copy>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <!-- generate the topology files that will be used for this run -->
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <copy todir="${tests.run.dir}/${tests.run.time}/config">
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <fileset dir="${tests.topology.dir}">
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <include name="**/*.txt"/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </fileset>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <filterchain>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <expandproperties/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos </filterchain>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </copy>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <!-- this is a windows-specific measure to replace the windows file
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl separator by a forward slash. Staf otherwise fails to find the files. -->
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos <replace file="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}" token="\" value="/"/>
660a40ad15749d74efa0dd4ef12cb8781c570e22Laszlo Hordos
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="tests.request" value="EXECUTE FILE ${tests.xml} JOBNAME OpenDS_${tests.type} SCRIPTFILE ${tests.run.dir}/${tests.run.time}/config/${tests.config.file} WAIT CLEARLOGS"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>While the tests are running you may tail the job logs at</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>${staf.install.dir}/${staf.name}/data-${host.name}/service/log/MACHINE/${host.name}/GLOBAL</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>Running tests. This will take more than a while.</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="CLASSPATH" value="${staf.lib.dir}/JSTAF.jar:."/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <exec
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl dir="${staf.bin.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl executable="${staf.executable}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl >
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <arg line="LOCAL STAX ${tests.request}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <env key="CLASSPATH" path="${staf.lib.dir}/JSTAF.jar:."/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <env key="LD_LIBRARY_PATH" value="${staf.lib.dir}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <env key="STAFCONVDIR" value="${staf.install.dir}/${staf.name}/codepage"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <env key="STAFCODEPAGE" value="LATIN_1"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </exec>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <symlink link="${tests.run.dir}/${remote.hostname}-latest" resource="${tests.run.time}" overwrite="true"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>Report is available at</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>${tests.run.dir}/${remote.hostname}-latest</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </target>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <target name="configure">
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>* Tests configuration</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Run the tests on the local machine or on a remote machine?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="local"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="local,remote"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="tests.mode.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter local hostname:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${local.hostname}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="local.hostname.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.mode.input}" arg2="remote"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter remote hostname:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue=""
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="remote.hostname.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <!-- Tests-defined values -->
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <available file="${basedir}/${tests.type}-${local.hostname.input}-${remote.hostname.input}.properties"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var file="${basedir}/${tests.type}-${local.hostname.input}-${remote.hostname.input}.properties"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="remote.hostname.input" value="${local.hostname.input}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <!-- Tests-defined values -->
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <available file="${basedir}/${tests.type}-${local.hostname.input}.properties"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var file="${basedir}/${tests.type}-${local.hostname.input}.properties"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.type}" arg2="stress-tests"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter client hostname:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${client.hostname}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="client.hostname.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter ldclt path (on client machine):"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${ldclt.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="ldclt.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="client.hostname.input" value="${client.hostname}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="ldclt.dir.input" value="${ldclt.dir}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter path to logs directory:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${logs.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="logs.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter path to OpenDS archive:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS name:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.name}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.name.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter java home:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${local.javahome}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="local.javahome.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.mode.input}" arg2="remote" />
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter java home (on remote machine):"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${remote.javahome}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="remote.javahome.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="remote.javahome.input" value="${local.javahome.input}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.mode.input}" arg2="remote" />
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter directory instance directory (on remote machine):"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${instance.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="instance.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter directory instance directory:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${instance.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="instance.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDMK lib directory:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${snmp.opendmk.lib.dir}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="snmp.opendmk.lib.dir.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Use default directory instance?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${tests.default}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="true,false"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="tests.default.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.default.input}" arg2="false"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS ldap port:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.port.ldap}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.port.ldap.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS admin port:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.port.admin}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.port.admin.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS secure ldap port:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.port.ldaps}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.port.ldaps.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS admin DN (also called root DN):"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.admin.dn}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.admin.dn.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Enter OpenDS admin password:"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${opends.admin.pwd}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="opends.admin.pwd.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="opends.port.ldap.input" value="${opends.port.ldap}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="opends.port.admin.input" value="${opends.port.admin}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="opends.port.ldaps.input" value="${opends.port.ldaps}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="opends.admin.dn.input" value="${opends.admin.dn}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="opends.admin.pwd.input" value="${opends.admin.pwd}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Run tests using verbose mode?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="${verbose.mode}"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="true,false"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="verbose.mode.input"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo>* Test plan configuration</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${test.plan.custom}" arg2=""/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo> No previous customized test plan found.</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <property name="prompt" value="y"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo> A previously customized test plan was detected:</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo> ${test.plan.custom}</echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <echo></echo>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Do you want to change the list of suites to run?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="y,n"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="n"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="prompt"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${prompt}" arg2="y" />
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var name="test.plan.custom" value=""/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Do you want to execute all the tests?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="y,n"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="y"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="answer"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${answer}" arg2="y" />
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${tests.type}" arg2="functional-tests"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var name="test.plan.custom" value="${test.plan.functional.default}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var name="test.plan.custom" value="${test.plan.stress.default}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </then>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <else>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <for param="item">
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <dirset dir="${tests.dir}/testcases"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl includes="*"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl excludes="quickstart,sample">
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <type type="dir"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl </dirset>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <sequential>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var name="test" unset="true"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <var name="answer" unset="true"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <basename property="test" file="@{item}"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <input message=" Do you want to execute ${test}?"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl validargs="y,n"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl defaultvalue="y"
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl addproperty="answer"/>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <if>
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <equals arg1="${answer}" arg2="y" />
8698e80519313c98c8d5c6de06ae04cdfc816cafMatthias Tristl <then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <equals arg1="${test.plan.custom}" arg2=""/>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <var name="test.plan.custom" value="${test}"/>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <else>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <var name="test.plan.custom" value="${test.plan.custom},${test}"/>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </else>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </sequential>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </for>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </else>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <echo>Saving ...</echo>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <if>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <equals arg1="${tests.mode.input}" arg2="remote"/>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <property name="property.file" value="${tests.type}-${local.hostname.input}-${remote.hostname.input}.properties"/>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl </then>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <else>
3dfd9546d8b1fd911523672bf4a23ce77f60f847Matthias Tristl <property name="property.file" value="${tests.type}-${local.hostname.input}.properties"/>
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasel </else>
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasel </if>
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasel <echo file="${basedir}/${property.file}"># Tests-defined values
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasel# This file is generated by "build tests-configure" command
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaseltests.mode=${tests.mode.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasellocal.hostname=${local.hostname.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasellocal.javahome=${local.javahome.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselremote.hostname=${remote.hostname.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselremote.javahome=${remote.javahome.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselclient.hostname=${client.hostname.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feasellogs.dir=${logs.dir.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.dir=${opends.dir.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.name=${opends.name.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaseltests.tmp.dir=${instance.dir.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaseltests.default=${tests.default.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselinstance.bin=${instance.dir.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselinstance.dir=${instance.dir.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.port.ldap=${opends.port.ldap.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.port.admin=${opends.port.admin.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.port.ldaps=${opends.port.ldaps.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.admin.dn=${opends.admin.dn.input}
b412f3c08f7621383d949c49539fa6c0a1644bf3Jake Feaselopends.admin.pwd=${opends.admin.pwd.input}
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaselsnmp.opendmk.lib.dir=${snmp.opendmk.lib.dir.input}
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaselldclt.dir=${ldclt.dir.input}
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaselverbose.mode=${verbose.mode.input}
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaselwc.type=tomcat
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaseltest.plan.custom=${test.plan.custom}
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feaseloriginal.archive=${opends.dir.input}/${opends.name.input}.zip</echo>
ab61902f12d107481f3484db5361bbe4a04bf56bJake Feasel </target>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <target name="coverage-init">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <path id="emma.lib">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <pathelement location="${project.home}/ext/emma/lib/emma.jar" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <pathelement location="${project.home}/ext/emma/lib/emma_ant.jar" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </path>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </target>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <target name="coverage-on" depends="coverage-init">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <property name="coverage.on" value="true"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </target>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <target name="coverage-instrument" if="coverage.on">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <delete dir="${temp.dir}/coverage-instr" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <mkdir dir="${temp.dir}/coverage-instr/opends" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <mkdir dir="${temp.dir}/coverage-instr/dsml" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- unzip the original package in a temporary location to make the
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold changes necessary so that the coverage tool is called
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <unzip src="${opends.dir}/${opends.name}.zip"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold dest="${temp.dir}/coverage-instr/opends"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <matches string="${product.name}" pattern="^OpenDS ."/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is not in the opends archive -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <unzip src="${opends.dir}/${opends.name}-DSML.war"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold dest="${temp.dir}/coverage-instr/dsml"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <else>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is in the opends archive -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <unzip src="${temp.dir}/coverage-instr/opends/${opends.name}/addons/DSML.war"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold dest="${temp.dir}/coverage-instr/dsml"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </else>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- Add emma in the package along with the other librairies
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold this has the advantage of being automatically picked up by the scripts
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <copy file="${project.home}/ext/emma/lib/emma.jar"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold tofile="${temp.dir}/coverage-instr/opends/${opends.name}/lib/emma.jar"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <copy file="${project.home}/ext/emma/lib/emma.jar"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold tofile="${temp.dir}/coverage-instr/dsml/WEB-INF/lib/emma.jar"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- move the original product package to make room for the coverage
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold enabled package
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <move file="${opends.dir}/${opends.name}.zip" tofile="${opends.dir}/${opends.name}.zip.nocov"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <matches string="${product.name}" pattern="^OpenDS ."/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is not in the opends archive, so we need to backup the original package -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <move file="${opends.dir}/${opends.name}-DSML.war" tofile="${opends.dir}/${opends.name}-DSML.war.nocov"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- intrument the OpenDS java archive to gather coverage -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <java classpath="${temp.dir}/coverage-instr/opends/${opends.name}/lib/emma.jar"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold classname="emma" fork="true">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <jvmarg value="-Demma.metadata.out.file=${temp.dir}/coverage-instr/opends/${opends.name}/coverage.em" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="instr" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-m" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="overwrite" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-org.opends.guitools.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-org.opends.quicksetup.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="org.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="com.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ip" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="${temp.dir}/coverage-instr/opends/${opends.name}/lib/OpenDS.jar:${temp.dir}/coverage-instr/opends/${opends.name}/lib/extensions/snmp-mib2605.jar" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </java>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <java classpath="${temp.dir}/coverage-instr/dsml/WEB-INF/lib/emma.jar"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold classname="emma" fork="true">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <jvmarg value="-Demma.metadata.out.file=${temp.dir}/coverage-instr/dsml/WEB-INF/lib/coverage.em" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="instr" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-m" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="overwrite" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-org.opends.guitools.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-org.opends.quicksetup.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="org.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ix" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="com.*" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="-ip" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <arg value="${temp.dir}/coverage-instr/dsml/WEB-INF/classes" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </java>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- Repackage DSML Gateway the product with coverage enabled scripts -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <matches string="${product.name}" pattern="^OpenDS ."/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is not in the opends archive, so we need to repackage the war file -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zip basedir="${temp.dir}/coverage-instr/dsml" destfile="${opends.dir}/${opends.name}-DSML.war">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zipfileset dir="${temp.dir}/coverage-instr/dsml"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold includes="WEB-INF/**,META-INF/**"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </zip>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <else>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is in the opends archive, so we need to replace the war file -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <delete file="${temp.dir}/coverage-instr/opends/${opends.name}/addons/DSML.war"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zip basedir="${temp.dir}/coverage-instr/dsml" destfile="${temp.dir}/coverage-instr/opends/${opends.name}/addons/DSML.war">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zipfileset dir="${temp.dir}/coverage-instr/dsml"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold includes="WEB-INF/**,META-INF/**"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </zip>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </else>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- Repackage OpenDS the product with coverage enabled scripts -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zip basedir="${temp.dir}/coverage-instr/opends" destfile="${opends.dir}/${opends.name}.zip">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <zipfileset dir="${temp.dir}/coverage-instr/opends"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold includes="${opends.name}/setup,${opends.name}/uninstall,${opends.name}/upgrade,${opends.name}/bin/*,${opends.name}/lib/*.sh"
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold filemode="755" dirmode="755" />
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </zip>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <delete dir="${temp.dir}/coverage-instr"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </target>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <target name="restore-pkg" if="coverage.on">
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <delete file="${opends.dir}/${opends.name}.zip"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <move file="${opends.dir}/${opends.name}.zip.nocov" tofile="${opends.dir}/${opends.name}.zip"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <matches string="${product.name}" pattern="^OpenDS ."/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <!-- The war file is not in the opends archive, so we need to restore the original package -->
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <delete file="${opends.dir}/${opends.name}-DSML.war"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <move file="${opends.dir}/${opends.name}-DSML.war.nocov" tofile="${opends.dir}/${opends.name}-DSML.war"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </then>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </if>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold </target>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold <target name="testwithcoverage" depends="coverage-on,coverage-instrument,run,restore-pkg"/>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold</project>
a60d77aaed3324cd783f4e648fedfecd54f8e551omebold