blob: 9363615f019d8c5bab97c75946cc0c2f6501da14 [file] [log] [blame]
<project
name="standaloneTest"
default="standaloneTest"
basedir=".">
<!--
Required inputs: build.home buildType buildId timestamp
build.stream [optional] build.committers [optional] testTarget
[optional]
-->
<property environment="env"/>
<!--
Let users override standard properties, if desired. If
directory, file, or some properties do not exist, then standard
properties will be used.
-->
<echo message="LOCAL_BUILD_PROPERTIES_DIR: ${env.LOCAL_BUILD_PROPERTIES_DIR}"/>
<property
name="wtp.builder.home"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDER}"/>
<property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
<fail
unless="projectname"
message="a projectname is required"/>
<property
name="keyCfgFile"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/>
<property
name="build.home"
value="${env.BUILD_HOME}"/>
<echo
level="info"
message="keyCfgFile: ${keyCfgFile}"/>
<!-- required to get proper value of dropinsFolder -->
<property file="${keyCfgFile}"/>
<fail
message="testRoot must be set for this task"
unless="env.PROJECT_TESTS"/>
<property
name="testRoot"
value="${env.PROJECT_TESTS}/${projectname}"/>
<property
name="dependencyFileLocation"
value="helios/dependencies.properties"/>
<property
name="build.distribution"
value="wtp"/>
<property
name="buildDirectory"
value="${env.PROJECT_PROJECTS}/${projectName}/workdir"/>
<property
name="dependency.properties"
value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDERS}/${dependencyFileLocation}"/>
<available
file="${dependency.properties}"
property="dependency.properties.exists"/>
<fail
message="dependency file not found: ${dependency.properties}"
unless="dependency.properties.exists"/>
<target name="standaloneTest">
<!--
copy our "map direcotry" to main build area. The are checked out by "checkout" script.
Things like 'dependencies.properties' are
required to be located there, such as when "site" is created at end of testing.
-->
<echo message="copy maps"/>
<echo message="todir: ${buildDirectory}/maps/${env.RELENG}/"/>
<echo message="from: ${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/"/>
<copy todir="${buildDirectory}/maps/${env.RELENG_BUILDERS}">
<fileset dir="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG_BUILDERS}"/>
</copy>
<property file="${build.home}/${env.RELENG_BUILDER}/build.properties"/>
<property file="${buildDirectory}/label.properties"/>
<property
name="local.cache.dir"
value="${env.LOCAL_PREREQS_CACHE}"/>
<property
name="wtp.id"
value="${buildType}-${buildId}-${timestamp}"/>
<property
name="wtp.dir.id"
value="${build.stream}/${wtp.id}"/>
<property
name="getprereq.wtp"
value="true"/>
<property
name="getprereq.wtptests"
value="true"/>
<!--
<property
name="getprereq.dalitests"
value="true"/>
-->
<property
name="test.installed"
value="true"/>
<property
name="doNotPublishEarly"
value="true"/>
<mkdir dir="${env.RECOMMENDED_TMP_DIR}"/>
<mkdir dir="${testRoot}"/>
<condition property="installed">
<available
file="${testRoot}/eclipse"
type="dir"/>
</condition>
<echo message="installed: ${installed}"/>
<echo message="installed location: ${testRoot}/eclipse"/>
<antcall target="run"/>
</target>
<target name="run">
<ant antfile="${wtp.builder.home}/distribution/${build.distribution}.tests/build.xml">
<property
name="testRoot"
value="${testRoot}"/>
<!-- if not otherwise set, assume all tests -->
<property
name="testTarget"
value="all"/>
<property
name="base.install.dir"
value="${testRoot}"/>
<property
name="dependencyTargets"
value="${wtp.builder.home}/scripts/dependency/build.xml"/>
</ant>
<copy
file="${wtp.builder.home}/distribution/${build.distribution}.tests/templateFiles/index.php"
todir="${testRoot}/results"
overwrite="true"/>
<available
file="${wtp.builder.home}/distribution/${build.distribution}.site/build.xml"
property="createSite"/>
<antcall target="createSite"/>
</target>
<target
name="createSite"
if="createSite">
<ant antfile="${wtp.builder.home}/distribution/${build.distribution}.site/build.xml"/>
</target>
<target
name="clean"
if="clean">
<property file="${wtp.builder.home}/build.properties"/>
<property
name="testRoot"
value="${build.home}/testRoot"/>
<delete
quiet="true"
dir="${testRoot}"
failonerror="false"/>
</target>
</project>