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