blob: 6f072efeb69d7d003d7c8e2758857ab1f06cc51e [file] [log] [blame]
<?xml version="1.0"?>
<project name="testsuite" default="run" basedir=".">
<property name="cachegrindClassname" value="org.eclipse.linuxtools.internal.valgrind.cachegrind.tests.AllTests" />
<property name="massifClassname" value="org.eclipse.linuxtools.internal.valgrind.massif.tests.AllTests" />
<property name="memcheckClassname" value="org.eclipse.linuxtools.internal.valgrind.memcheck.tests.AllTests" />
<property name="cachegrind-plugin-name" value="org.eclipse.linuxtools.valgrind.cachegrind.tests" />
<property name="massif-plugin-name" value="org.eclipse.linuxtools.valgrind.massif.tests" />
<property name="memcheck-plugin-name" value="org.eclipse.linuxtools.valgrind.memcheck.tests" />
<!-- The property ${eclipse-home} should be passed into this script -->
<!-- Set a meaningful default value for when it is not. -->
<property name="eclipse-home" value="${basedir}/../.." />
<property name="library-file" value="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.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" />
</delete>
</target>
<target name="memchecksuite">
<property name="memcheck-folder" value="${eclipse-home}/memcheck_folder" />
<delete dir="${massif-folder}" quiet="true" />
<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${massif-folder}" />
<property name="plugin-name" value="${memcheck-plugin-name}" />
<property name="classname" value="${memcheckClassname}" />
</ant>
</target>
<target name="massifsuite">
<property name="massif-folder" value="${eclipse-home}/massif_folder" />
<delete dir="${massif-folder}" quiet="true" />
<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${massif-folder}" />
<property name="plugin-name" value="${massif-plugin-name}" />
<property name="classname" value="${massifClassname}" />
</ant>
</target>
<target name="cachegrindsuite">
<property name="cachegrind-folder" value="${eclipse-home}/cachegrind_folder" />
<delete dir="${cachegrind-folder}" quiet="true" />
<ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${cachegrind-folder}" />
<property name="plugin-name" value="${cachegrind-plugin-name}" />
<property name="classname" value="${cachegrindClassname}" />
</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">
<mkdir dir="${results}/consolelogs" />
<copy failonerror="false" file="${eclipse-home}/results/${classname}.txt" tofile="${results}/consolelogs/${classname}_${platform}.metadata.log.txt" />
</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,memchecksuite,massifsuite,cachegrindsuite,cleanup">
<ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
<property name="includes" value="org*.xml" />
<property name="output-file" value="${plugin-name}.xml" />
</ant>
</target>
</project>