blob: 2746a617de7270fe654d489ad97a0b9cb788b58c [file] [log] [blame]
<?xml version="1.0"?>
<project name="Automated Testing for QVT OML" default="all" basedir=".">
<!-- Adjust these properties as appropriate before executing tests. During the automated build,
these are set based on the build configuration settings. -->
<property name="baseLocation" value="${basedir}/../.."/>
<!-- Load the pluginVersions.property file generated by the build -->
<property file="${buildRoot}/tests/finalPluginsVersions.properties"/>
<property name="eclipse-home" value="${baseLocation}" />
<target name="cleanup.config">
<echo message="Cleaning up eclipse config..."/>
<delete includeemptydirs="true">
<fileset dir="${baseLocation}/configuration">
<include name="**/*"/>
<exclude name="config.ini"/>
<exclude name="*.log"/>
</fileset>
</delete>
</target>
<target name="runtests" description="Executes the junit tests for a specified plug-in.">
<!-- Pull the test.xml out of the test bundle -->
<unzip src="${baseLocation}/plugins/${testPlugin}_${version}.jar" dest="${baseLocation}/plugins/${testPlugin}_${version}">
<patternset>
<include name="test.xml"/>
</patternset>
</unzip>
<!-- Invoke the tests -->
<ant antfile="${baseLocation}/plugins/${testPlugin}_${version}/test.xml" dir="${eclipse-home}" />
<!--- Remove extracted test.xml -->
<delete dir="${baseLocation}/plugins/${testPlugin}_${version}"/>
<move file="${baseLocation}/${testPlugin}.xml" tofile="${basedir}/testresults/xml/${testPlugin}.xml" />
</target>
<!-- For each, the version value is what's found in generated finalPluginVersions.properties file. Typically,
it is the build id (e.g. I20060131-0200) -->
<target name="all" depends="cleanup.config" description="Runs the test.xml of the test plugins">
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.m2m.tests.qvt.oml" />
<param name="version" value="${org.eclipse.m2m.tests.qvt.oml}" />
</antcall>
<antcall target="runtests">
<param name="testPlugin" value="org.eclipse.m2m.tests.qvt.oml.ui" />
<param name="version" value="${org.eclipse.m2m.tests.qvt.oml.ui}" />
</antcall>
<antcall target="genHtml"/>
</target>
<target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided">
<style style="${basedir}/JUNIT.XSL" basedir="${basedir}/testresults/xml" destdir="${basedir}/testresults/html/" />
</target>
</project>