eclipse/eclipse-tests-libraryXml.patch
Andrew Overholt 8db956b337 - Add test framework
- Remove two duplicate lines in eclipse-mv-Platform.sh
- Modify package-build and pdebuild so they can build the SDK tests
2008-08-27 20:12:35 +00:00

98 lines
4.1 KiB
Diff

diff -up ./org.eclipse.test/library.xml.orig ./org.eclipse.test/library.xml
--- ./org.eclipse.test/library.xml.orig 2008-08-27 15:10:17.000000000 -0400
+++ ./org.eclipse.test/library.xml 2008-08-27 15:11:16.000000000 -0400
@@ -40,8 +40,10 @@
</condition>
<property name="extraVMargs" value=""/>
<property name="plugin-path" value="" />
+ <property name="tmpresults" value="${eclipse-home}/tmpresults/" />
+ <property name="testhome" value="${eclipse-home}/testhome" />
<property name="timeout" value="7200000" />
- <property name="test-output" value="${eclipse-home}/${classname}.xml" />
+ <property name="test-output" value="${tmpresults}/${classname}.xml" />
<property name="junit-report-output" value="${eclipse-home}/results" />
<mkdir dir="${junit-report-output}"/>
</target>
@@ -60,7 +62,11 @@
<target name="java-test">
<!--default vm args-->
- <property name="vmargs" value=" -Xms40m -Xmx256m"/>
+ <property name="vmargs" value=" -Xms40m -Xmx512m"/>
+ <delete failonerror="false" includeEmptyDirs="true">
+ <fileset dir="${testhome}" includes="**/*"/>
+ </delete>
+ <mkdir dir="${testhome}"/>
<!--set default jvm to use for testing-->
<property name="jvm" value="${java.home}/bin/java" />
@@ -75,7 +81,7 @@
</fileset>
</classpath>
<arg line="-application ${application}"/>
- <arg line="-data ${data-dir}"/>
+ <arg line="-data ${test-data-dir}"/>
<arg line="formatter=${formatter},${test-output}"/>
<arg line="-testPluginName ${plugin-name}"/>
<arg line="-className ${classname}"/>
@@ -83,15 +89,29 @@
<arg line="-ws ${ws}"/>
<arg line="-arch ${arch}"/>
<arg line="-consolelog"/>
+ <arg line="-clean"/>
+ <arg line="-Dswt.library.path=/usr/lib/eclipse"/>
+ <arg line="-Dsetup.override.vmArgs=Xms40m;Xmx512m"/>
+ <arg line="-Dsetup.override.systemProperties=PLUGIN_PATH=${plugin-path};user.home=${testhome}"/>
<jvmarg line="${vmargs} ${extraVMargs}"/>
<sysproperty key="PLUGIN_PATH" value="${plugin-path}"/>
+ <sysproperty key="user.home" value="${testhome}"/>
+ <sysproperty key="swt.library.path" value="/usr/lib/eclipse"/>
+ <sysproperty key="setup.override.vmArgs" value="Xms40m;Xmx512m"/>
+ <sysproperty key="setup.override.systemProperties" value="PLUGIN_PATH=${plugin-path};user.home=${testhome}"/>
+ <sysproperty key="sdk.tests.data.dir" value="${data-dir}"/>
+ <sysproperty key="osgi.configuration.area" value="${data-dir}"/>
</java>
<antcall target="collect-results" />
</target>
<target name="eclipse-test" description="Runs the specified classname as a plug-in test.">
<property name="vmargs" value="-Xms256m -Xmx512m"/>
-
+ <delete failonerror="false" includeEmptyDirs="true">
+ <fileset dir="${testhome}" includes="**/*"/>
+ </delete>
+ <mkdir dir="${testhome}"/>
+
<!--use -consolelog if launching a headless test-->
<condition property="consolelog" value="-consolelog">
<equals arg1="${application}" arg2="org.eclipse.test.coretestapplication"/>
@@ -125,6 +145,8 @@
<arg line="--launcher.suppressErrors"/>
<arg line="${consolelog}"/>
<arg line="-vmargs ${vmargs} ${extraVMargs} -DPLUGIN_PATH=${plugin-path}"/>
+ <arg line="-Duser.home=${testhome}"/>
+ <arg line="-Dsetup.override.systemProperties=PLUGIN_PATH=${plugin-path};user.home=${testhome}"/>
</exec>
<antcall target="collect-results" />
</target>
@@ -138,7 +160,7 @@
</fileset>
</junitreport>
- <style style="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
+ <style style="${eclipse-home}/dropins/sdk/plugins/org.eclipse.test/JUNIT.XSL"
basedir="${junit-report-output}"
includes="${classname}.result.xml"
destdir="${junit-report-output}" />
@@ -158,8 +180,8 @@
includes - the names of the files to include
output-file - the name of the output file to produce
-->
- <junitreport todir="." tofile="${output-file}">
- <fileset dir=".">
+ <junitreport todir="${results}" tofile="${output-file}">
+ <fileset dir="${tmpresults}">
<include name="${includes}"/>
</fileset>
</junitreport>