blob: 847ff4d934a172d1a11efae2402426b6c20a4007 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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="Harmony Test" default="test" basedir=".">
<property name="hy.hdk" location="../.." />
<property name="test.jre.home" location="${hy.hdk}/jdk/jre" />
<property file="test.properties" />
<!-- These two parameters could be assigned by user -->
<property name="target.dir" value="." />
<property name="work.dir" value="${target.dir}" />
<property name="tests.output" value="${work.dir}/report" />
<property name="junit.jar" value="${target.dir}/junit.jar" />
<import file="../ant/properties.xml" />
<target name="test"
depends="test-jre-vm-info,-test,gen-report,check-test-result" />
<target name="-test">
<echo message="Test Work Dir: ${work.dir}" />
<echo message="Test Target Dir: ${target.dir}" />
<mkdir dir="${work.dir}" />
<delete dir="${tests.output}" quiet="true"/>
<poll-modules dir="." target="test-module" />
</target>
<target name="check-test-result">
<available property="test.errors" file="${work.dir}/report/test.errors" />
<available property="test.failures" file="${work.dir}/report/test.failures" />
<fail if="test.errors" message="There were test errors." />
<fail if="test.failures" message="There were test failures." />
</target>
<target name="gen-report">
<junitreport todir="${tests.output}">
<fileset dir="${tests.output}">
<include name="TEST*-*.xml" />
</fileset>
<report format="frames" todir="${tests.output}" />
</junitreport>
<property name="display-location"
location="${tests.output}/index.html"/>
<echo message="The test report is in ${display-location}"/>
</target>
</project>