<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="test" name="org.python.pydev.refactoring.tests">
	<property name="eclipse.home" value="/opt/eclipse" />
	<property name="junit.output.dir" value="test" />
	<property name="target" value="1.5" />
	<property name="source" value="1.5" />

	<path id="project.classpath">
		<fileset dir="${eclipse.home}/plugins">
			<include name="*.jar" />
		</fileset>
		<fileset dir="${eclipse.home}/plugins/org.junit_3.8.1">
			<include name="junit.jar" />
		</fileset>
		<fileset dir="tests/lib">
			<include name="*.jar" />
		</fileset>
		<fileset dir="../org.python.pydev.jython">
			<include name="jython.jar" />
		</fileset>
		<fileset dir=".">
			<include name="refactoring.jar"/>
		</fileset>
		<pathelement location="bintest" />
                <fileset dir="../org.python.pydev">
                        <include name="pydev.jar" />
                </fileset>
                <fileset dir="../org.python.pydev.core">
                        <include name="core.jar" />
                </fileset>
                <fileset dir="../org.python.pydev.parser">
                        <include name="parser.jar" />
                </fileset>
	</path>

	<target name="init">
		<mkdir dir="${junit.output.dir}" />
		<mkdir dir="bintest" />
		<mkdir dir="bintest/tests/python"/>

		<!-- <ant antfile="build.xml" dir="../org.python.pydev.feature"/> -->

		<javac destdir="bintest" srcdir="tests" source="${source}" target="${target}">
			<classpath refid="project.classpath" />
		</javac>
		<copy todir="bintest/tests/python">
			<fileset dir="tests/python"/>
		</copy>
	</target>

	<target name="clean">
		<delete dir="test" />
		<delete dir="bintest"/>
	</target>

	<target name="test" depends="init">
		<junit fork="yes" haltonfailure="true" dir="${basedir}">
			<formatter type="xml" />
			<formatter type="plain" usefile="true" />
			<classpath refid="project.classpath" />
			<test name="org.python.pydev.refactoring.tests.AllTests" todir="${junit.output.dir}" />
		</junit>
	</target>
</project>
