1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

Support for both jarred and unjarred plugins

This commit is contained in:
Martin Oberhuber 2008-02-13 20:35:17 +00:00
parent a4ce9b1dd1
commit 40540ec5d5

View file

@ -50,20 +50,26 @@
</target>
<target name="runtests" depends="setup" description="Runs ant on the test.xml for a specified plugin. Requires a property value setting for testPlugin only if test.properties is not available. The property testPlugin represents a directory name made up of the plugin id and plugin version. This directory must contain a valid test.xml.">
<!-- TODO: if your test plugin is jarred, do nothing here
TODO: if your test plugin is NOT a jarred plugin, uncomment the next line and comment out the 4 lines thereafter -->
<echo message="${eclipse-home}/plugins/${testPlugin} is not a jarred plugin. No unpack required!"/>
<!-- <echo message="Unpack ${eclipse-home}/plugins/${testPlugin}.jar to ${eclipse-home}/plugins/${testPlugin} ... "/> -->
<!-- <move file="${eclipse-home}/plugins/${testPlugin}.jar" tofile="${eclipse-home}/plugins/${testPlugin}_.jar"/> -->
<!-- <unjar src="${eclipse-home}/plugins/${testPlugin}_.jar" dest="${eclipse-home}/plugins/${testPlugin}"/> -->
<!-- <delete file="${eclipse-home}/plugins/${testPlugin}_.jar"/> -->
<echo message="Running test.xml from jarfile ${eclipse-home}/plugins/${testPlugin} ... "/>
<ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}"/>
<copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" />
</target>
<target name="unjarPlugin" depends="setup">
<echo message="Unpack ${eclipse-home}/plugins/${testPlugin}.jar to ${eclipse-home}/plugins/${testPlugin} ... "/>
<move file="${eclipse-home}/plugins/${testPlugin}.jar" tofile="${eclipse-home}/plugins/${testPlugin}_.jar"/>
<unjar src="${eclipse-home}/plugins/${testPlugin}_.jar" dest="${eclipse-home}/plugins/${testPlugin}"/>
<delete file="${eclipse-home}/plugins/${testPlugin}_.jar"/>
</target>
<target name="dontUnjarPlugin" depends="setup">
<echo message="${eclipse-home}/plugins/${testPlugin} is not a jarred plugin. No unpack required!"/>
</target>
<target name="rse" description="Runs the test.xml of the rse.tests plugin">
<antcall target="dontUnjarPlugin">
<param name="testPlugin" value="${org.eclipse.rse.tests}" />
</antcall>
<antcall target="runtests">
<param name="testPlugin" value="${org.eclipse.rse.tests}" />
<param name="report" value="org.eclipse.rse.tests" />
@ -77,6 +83,9 @@
</target>
<target name="terminal" description="Runs the test.xml of the tm.terminal.test plugin">
<antcall target="unjarPlugin">
<param name="testPlugin" value="${org.eclipse.tm.terminal.test}" />
</antcall>
<antcall target="runtests">
<param name="testPlugin" value="${org.eclipse.tm.terminal.test}" />
<param name="report" value="org.eclipse.tm.terminal.test" />