2644N/A ! The contents of this file are subject to the terms of the 2644N/A ! Common Development and Distribution License, Version 1.0 only 2644N/A ! (the "License"). You may not use this file except in compliance 2644N/A ! You can obtain a copy of the license at 2644N/A ! See the License for the specific language governing permissions 2644N/A ! and limitations under the License. 2644N/A ! When distributing Covered Code, include this CDDL HEADER in each 2644N/A ! file and include the License file at 2644N/A ! add the following below this CDDL HEADER, with the fields enclosed 2644N/A ! by brackets "[]" replaced with your own identifying information: 2644N/A ! Portions Copyright [yyyy] [name of copyright owner] 2644N/A ! Copyright 2008-2009 Sun Microsystems, Inc. 2644N/A<
project name="opends-staf-tests" basedir="../.." default="usage">
2644N/A Installer ant file for the staf platform
2644N/A This allows tests that need a running instance of staf to easily
2644N/A get one and hides all the complexity under the hood
2644N/A <!-- ################## --> 2644N/A <!-- # ANT PROPERTIES # --> 2644N/A <!-- ################## --> 2644N/A <!-- Display ant properties --> 2644N/A <!-- Initialise variables --> 2644N/A <
target name="global-init">
2644N/A value="${SHORT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
2644N/A <
property environment="env"/>
2644N/A <!-- Check if the current platform is supported --> 2644N/A <!-- Solaris sparc 32 bit --> 2644N/A <!-- Solaris sparc 64 bit --> <
property name="os.myname" value="solaris-x64-64"/>
<
exec executable="uname" outputproperty="host.name">
<
property name="var.path" value="PATH"/>
<
property name="os.myname" value="linux-amd64"/>
<
exec executable="uname" outputproperty="host.name">
<
property name="var.path" value="PATH"/>
<
property name="var.path" value="Path"/>
<
fail>"Unsupported platform."</
fail>
<
property name="staf.type" value="controller"/>
<
property name="tests.type" value="functional-tests"/>
<!-- Default values for build environment --> <!-- User-defined values --> <!-- Tests-defined values --> <
equals arg1="${tests.type}" arg2="functional-tests"/>
<!-- Set value for variables which depends on user configuration --> <!-- Configure user variables --> <
target name="user-configure" <
target name="proxy-check" depends="global-init,proxy-check">
<!-- Download dependencies --> <
target name="dependencies-download" depends="global-init,proxy-set">
<!-- Remove current dependencies --> <
target name="dependencies-remove" <!-- Remove old dependencies --> <
target name="dependencies-removeold" <!-- Remove all dependencies --> <
target name="dependencies-removeall" <
target name="set-controller-type">
<
property name="staf.type" value="controller"/>
<
target name="set-slave-type">
<!-- Install STAF and STAF services --> <
target name="staf-install" depends="global-init,dependencies-download">
<!-- Uninstall STAF and STAF services --> <
target name="staf-uninstall" depends="global-init,staf-stop">
<
target name="staf-start">
<
antcall target="staf-controller-start"/>
<
target name="staf-controller-start" depends="set-controller-type,global-init,staf-install">
<
target name="staf-slave-start" depends="set-slave-type,global-init,staf-install">
<
target name="staf-status" depends="global-init,staf-start">
<!-- Display STAF JVM logs --> <
target name="staf-jvmlogs" depends="global-init,staf-start">
<!-- generate tests specs --> <
target name="tests-specs" depends="set-func-type,global-init">
<
target name="set-func-type">
<
property name="tests.type" value="functional-tests"/>
<
target name="set-stress-type">
<
property name="tests.type" value="stress-tests"/>
<!-- Configure tests to run --> <
target name="tests-configure">
<
antcall target="tests-func-configure"/>
<!-- Configure functional tests to run --> <
target name="tests-func-configure" depends="set-func-type,global-init">
<!-- Configure stress tests to run --> <
target name="tests-stress-configure" depends="set-stress-type,global-init">
<
target name="tests-run">
<
antcall target="tests-func-run"/>
<!-- Run functional tests --> <
target name="tests-func-run" depends="set-func-type,global-init,opends-build,staf-start">
<
target name="tests-func-coverage" depends="set-func-type,global-init,opends-build,staf-start">
<!-- Run stress tests --> <
target name="tests-stress-run" depends="set-stress-type,global-init,opends-build,staf-start">
<!-- Build OpenDS zip --> <
target name="opends-build"