blob: 9112aaea4671924338fad1731e67c877a57cf3f0 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="BlazeDS QA" default="main" basedir=".">
<property name="qa.dir" value="${basedir}" />
<property name="blazeds.dir" value="${qa.dir}/.." />
<property file="${qa.dir}/local.properties"/>
<property file="${qa.dir}/build.properties"/>
<property environment="env"/>
<property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/>
<property name="appserver" value="tomcat" />
<property name="branch" value="blazeds"/>
<property name="war" value="qa-regress"/>
<property name="tomcat.dir" value="${appserver.dir}"/>
<property name="qa.server.testsuites" value="${qa.dir}/apps/qa-regress/testsuites"/>
<property name="qa.server.mxunit.dir" value="${qa.server.testsuites}/mxunit"/>
<property name="qa.server.flexunit.dir" value="${qa.server.testsuites}/flexunit"/>
<!--if CruiseControl is used, label is set to SVN revision-->
<property name="label" value="dev"/>
<property name="server.baseurl" value="http://localhost:8400"/>
<property name="ant-contrib.jar" location="${env.ANT_HOME}/lib/ant-contrib-1.0b2.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${ant-contrib.jar}"/>
<path id="flex.qa.lib.classpath">
<fileset dir="${qa.dir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="main" description="Full test run of flexunit and mxunit tests." depends="full" />
<target name="full" description="Run the flexunit and mxunit tests" >
<property name="runtype" value="full" />
<ant antfile="${qa.server.flexunit.dir}/build.xml" target="main"/>
<ant antfile="${qa.server.mxunit.dir}/build.xml" target="main"/>
<ant antfile="${qa.server.mxunit.dir}/build.xml" target="main">
<property name="isSSL" value="true"/>
</ant>
</target>
<!-- Don't try to start server if it is already running -->
<target name="check.server">
<condition property="server.running">
<http url="${server.baseurl}"/>
</condition>
</target>
<target name="set.extension" description="set vars per os">
<osfamily property="os.family"/>
<switch value="${os.family}">
<case value="windows">
<property name="shellext" value="bat"/>
</case>
<case value="unix">
<property name="shellext" value="sh"/>
</case>
<case value="mac">
<property name="shellext" value="sh"/>
</case>
</switch>
</target>
<target name="appServer.start" description="-> starts app server" depends="set.extension, check.server"
unless="server.running">
<exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"
dir="${appserver.dir}/bin">
<arg line="start" />
</exec>
</target>
<target name="appServer.stop" description="-> stops app server"
depends="set.extension">
<exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"
dir="${appserver.dir}/bin">
<arg line="stop" />
</exec>
<echo message="Sleeping 15 seconds..."/>
<sleep seconds="15"/>
</target>
</project>