84N/A ! CDDL HEADER START 84N/A ! The contents of this file are subject to the terms of the 84N/A ! Common Development and Distribution License, Version 1.0 only 84N/A ! (the "License"). You may not use this file except in compliance 84N/A ! with the License. 84N/A ! You can obtain a copy of the license at 84N/A ! See the License for the specific language governing permissions 84N/A ! and limitations under the License. 84N/A ! When distributing Covered Code, include this CDDL HEADER in each 84N/A ! file and include the License file at 84N/A ! add the following below this CDDL HEADER, with the fields enclosed 84N/A ! by brackets "[]" replaced with your own identifying information: 873N/A ! Portions Copyright [yyyy] [name of copyright owner] 84N/A ! Copyright 2008-2010 Sun Microsystems, Inc. 3233N/A ! Portions Copyright 2011 ForgeRock AS 84N/A<
project name="opends-staf-tests" basedir="../.." default="usage">
1895N/A Installer ant file for the staf platform
1920N/A This allows tests that need a running instance of staf to easily
1920N/A get one and hides all the complexity under the hood
1895N/A <!-- ################## --> 1920N/A <!-- # ANT PROPERTIES # --> 1920N/A <!-- ################## --> 3824N/A <!-- Display ant properties --> 2976N/A <!-- Initialise variables --> 2650N/A <
target name="global-init">
2976N/A value="${SHORT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
828N/A <!-- User environment --> 84N/A <
property environment="env"/>
1777N/A <!-- Check if the current platform is supported --> 84N/A <!-- Solaris system --> <!-- Solaris sparc 32 bit --> <
property name="os.myname" value="solaris-sparc"/>
<!-- Solaris sparc 64 bit --> <
property name="os.myname" value="solaris-sparc64"/>
<
property name="os.myname" value="solaris-x86"/>
<
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="os.myname" value="macosx-universal"/>
<
exec executable="uname" outputproperty="host.name">
<
property name="var.path" value="PATH"/>
<
property name="var.path" value="Path"/>
<
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 --> <!-- Glassfish webcontainer --> <
case value="sunwebserver">
<!-- SunWebserver webcontainer --> <!-- Tomcat webcontainer --> <!-- 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"