blob: bb8ba7499a4e67d0bdc92e9a892acea9a32a484c [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="compiler.jx.tests" default="main" basedir=".">
<pathconvert property="compiler.tests" dirsep="/">
<path location="${basedir}"/>
</pathconvert>
<property environment="env"/>
<property file="unittest.properties" />
<property name="test.timeout" value="300000" />
<property name="maxmem" value="512" />
<condition property="sdk" value="${FLEX_HOME}" else="${env.FLEX_HOME}">
<isset property="FLEX_HOME" />
</condition>
<property name="compiler" value="${compiler.tests}/../compiler.jx"/>
<target name="download" description="Downloads third-party JARs">
<ant antfile="${compiler.tests}/downloads.xml" dir="${compiler.tests}"/>
<delete dir="${compiler.tests}/in"/>
</target>
<target name="compile.unit.tests">
<delete dir="${compiler.tests}/classes"/>
<mkdir dir="${compiler.tests}/classes"/>
<javac debug="${javac.debug}" deprecation="${javac.deprecation}" destdir="${compiler.tests}/classes" includeAntRuntime="true">
<src path="${compiler.tests}/src"/>
<compilerarg value="-Xlint:all,-path"/>
<classpath>
<fileset dir="${compiler}/lib" includes="**/*.jar"/>
<fileset dir="${compiler.tests}/lib" includes="**/*.jar"/>
</classpath>
</javac>
</target>
<target name="unit.tests" depends="download, compile.unit.tests">
<mkdir dir="${compiler.tests}/results"/>
<mkdir dir="${compiler.tests}/temp"/>
<junit dir="${compiler.tests}"
fork="yes" forkMode="perBatch" maxmemory="${maxmem}m" timeout="${test.timeout}"
printsummary="true" showoutput="true"
haltonerror="false" haltonfailure="false"
failureproperty="tests.unit.failed">
<classpath>
<pathelement location="${compiler.tests}/classes"/>
<fileset dir="${compiler}/lib" includes="**/*.jar"/>
<fileset dir="${compiler.tests}/lib" includes="**/*.jar"/>
</classpath>
<batchtest todir="${compiler.tests}/results">
<fileset dir="${compiler.tests}/classes">
<include name="**/Test*.class"/>
</fileset>
</batchtest>
<formatter type="xml"/>
</junit>
</target>
<target name="main" depends="unit.tests"/>
<target name="clean">
<delete dir="${compiler.tests}/bin"/>
<delete dir="${compiler.tests}/classes"/>
<delete dir="${compiler.tests}/results"/>
</target>
<target name="wipe" depends="clean">
<delete dir="${compiler.tests}/lib"/>
<delete dir="${compiler.tests}/temp"/>
</target>
</project>