<?xml version="1.0"?>

<project name="testsuite" default="run" basedir=".">

	<!-- sets the library-file -->
	<property name="library-file" value="${eclipse-home}/plugins/${org.eclipse.php.test}/library.xml" />

	<!-- This target holds all initialization code that needs to be done for -->
	<!-- all tests that are to be run. Initialization for individual tests -->
	<!-- should be done within the body of the suite target. -->
	<target name="init">
		<tstamp />
		<delete>
			<fileset dir="${eclipse-home}" includes="org*.xml" />
			<fileset dir="${eclipse-home}" includes="net*.xml" />
		</delete>
	</target>

	<!-- This target defines the tests that need to be run. -->
	<target name="suite">
		<property name="test-folder" value="${eclipse-home}/${testTarget}_folder" />
		<delete dir="${test-folder}" quiet="true" />
		<ant target="java-test" antfile="${library-file}" dir=".">
			<property name="data-dir" value="${test-folder} -dev bin" />
			<property name="plugin-name" value="${testPlugin}" />
		</ant>
	</target>

	<!-- This target holds code to cleanup the testing environment after -->
	<!-- after all of the tests have been run. You can use this target to -->
	<!-- delete temporary files that have been created. -->
	<target name="cleanup">
	</target>

	<!-- This target runs the test suite. Any actions that need to happen -->
	<!-- after all the tests have been run should go here. -->
	<target name="run" depends="init,suite,cleanup">

		<dirname property="output-dir" file="${test-output}"/>


		<junitreport todir="${junit-report-output}" tofile="TEST-php.xml">
			<fileset dir="${output-dir}">
				<include name="*.result.xml"/>
			</fileset>
		</junitreport>

		<xslt style="${eclipse-home}/plugins/${org.eclipse.php.test}/JUNIT.XSL"
			in="${junit-report-output}/TEST-php.xml"
			out="${junit-report-output}/TEST-php.html"/>


	</target>
</project>
