Andrew Overholt ce60880
### Eclipse Workspace Patch 1.0
Andrew Overholt ce60880
#P org.eclipse.test
Andrew Overholt ce60880
Index: library.xml
Andrew Overholt ce60880
===================================================================
Andrew Overholt ce60880
RCS file: /cvsroot/eclipse/org.eclipse.test/library.xml,v
Andrew Overholt ce60880
retrieving revision 1.33
Andrew Overholt ce60880
diff -u -r1.33 library.xml
Andrew Overholt ce60880
--- library.xml	13 Mar 2008 14:00:36 -0000	1.33
Andrew Overholt 577aa1e
+++ library.xml	5 Dec 2008 14:11:35 -0000
Andrew Overholt ce60880
@@ -6,13 +6,13 @@
Andrew Overholt ce60880
 	</target>
Andrew Overholt ce60880
 
Andrew Overholt ce60880
 	<target name="init">
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+		
Andrew Overholt ce60880
 			Parameters:
Andrew Overholt ce60880
 				(Mandatory)
Andrew Overholt ce60880
 				data-dir		- the directory for Eclipse to write its data
Andrew Overholt ce60880
 				plugin-name		- the name of the plugin to test
Andrew Overholt ce60880
 				classname		- the name of the test class
Andrew Overholt ce60880
-				
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 				(Optional - overrides defaults set in script)
Andrew Overholt ce60880
 				vmargs			- a string containing arguments to pass to the VM.
Andrew Overholt ce60880
 				extraVMargs		- allows separate setting of VM args from separate caller.
Andrew Overholt ce60880
@@ -22,7 +22,7 @@
Andrew Overholt ce60880
 				useEclipseExe	- property setting forces test to launch via eclipse executable.
Andrew Overholt ce60880
 				junit-report-output - output directory for junit reports produced for specified classname.
Andrew Overholt ce60880
 		-->
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 	  	<tstamp>
Andrew Overholt ce60880
 	        <format property="TIMENOW" pattern="HHmmssSSSS"/>
Andrew Overholt ce60880
 	    </tstamp>
Andrew Overholt ce60880
@@ -33,25 +33,27 @@
Andrew Overholt ce60880
 		
Andrew Overholt ce60880
 		<property name="launchTarget" value="java-test" />
Andrew Overholt ce60880
 		<property name="formatter" value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/>
Andrew Overholt ce60880
-	    
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 		
Andrew Overholt ce60880
 	    <condition property="vmargs" value=" -Xms256M -Xmx256M">
Andrew Overholt ce60880
 			<equals arg1="${test.target}" arg2="performance" />
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 ce60880
-	
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 	<target name="core-test" description="Eclipse application used to launch HEADLESS plugin tests." depends="init">
Andrew Overholt ce60880
 		<antcall target="${launchTarget}">
Andrew Overholt ce60880
 			<param name="application" value="org.eclipse.test.coretestapplication"/>
Andrew Overholt ce60880
 		</antcall>
Andrew Overholt ce60880
 	</target>
Andrew Overholt ce60880
-	
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 	<target name="ui-test" description="Eclipse application used to launch UI plugin tests." depends="init">
Andrew Overholt ce60880
 		<antcall target="${launchTarget}">
Andrew Overholt ce60880
 			<param name="application" value="org.eclipse.test.uitestapplication"/>
Andrew Overholt ce60880
@@ -60,13 +62,17 @@
Andrew Overholt 465153c
 
Andrew Overholt 465153c
 	<target name="java-test">
Andrew Overholt 465153c
 		
Andrew Overholt 465153c
-		<property name="vmargs" value=" -Xms40m -Xmx256m"/>
Andrew Overholt ce60880
-	  	
Andrew Overholt ce60880
+		<property name="vmargs" value=" -Xms256m -Xmx1024m -XX:MaxPermSize=512m"/>
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 ce60880
+
Andrew Overholt 465153c
 	  	
Andrew Overholt ce60880
-	   	<property name="jvm" value="${java.home}/bin/java" />  	
Andrew Overholt ce60880
-	
Andrew Overholt ce60880
+	   	<property name="jvm" value="${java.home}/bin/java" />
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 		
Andrew Overholt ce60880
 			classname="org.eclipse.core.launcher.Main" output="${junit-report-output}/${classname}.txt">
Andrew Overholt ce60880
 	        <classpath>
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 ce60880
@@ -83,15 +89,30 @@
Andrew Overholt 465153c
 		    <arg line="-ws ${ws}"/>
Andrew Overholt 465153c
 		    <arg line="-arch ${arch}"/>
Andrew Overholt 465153c
 		    <arg line="-consolelog"/>
Andrew Overholt ce60880
+			<arg line="-clean"/>
Andrew Overholt ce60880
+			<arg line="-Dswt.library.path=/usr/lib/eclipse"/>
Andrew Overholt 577aa1e
+			<arg line="-Dsetup.override.vmArgs=Xms256m;Xmx1024m"/>
Andrew Overholt ce60880
+			<arg line="-Dsetup.override.systemProperties=PLUGIN_PATH=${plugin-path};user.home=${testhome}"/>
Andrew Overholt 465153c
 		    <jvmarg line="${vmargs} ${extraVMargs}"/>
Andrew Overholt ce60880
-		    <sysproperty key="PLUGIN_PATH" value="${plugin-path}"/> 
Andrew Overholt ce60880
+		    <sysproperty key="PLUGIN_PATH" value="${plugin-path}"/>
Andrew Overholt ce60880
+			<sysproperty key="user.home" value="${testhome}"/>
Andrew Overholt ce60880
+			<sysproperty key="swt.library.path" value="/usr/lib/eclipse"/>
Andrew Overholt 577aa1e
+			<sysproperty key="setup.override.vmArgs" value="Xms256m;Xmx1024m"/>
Andrew Overholt ce60880
+			<sysproperty key="setup.override.systemProperties" value="PLUGIN_PATH=${plugin-path};user.home=${testhome}"/>
Andrew Overholt ce60880
+			<sysproperty key="sdk.tests.data.dir" value="${data-dir}"/>
Andrew Overholt ce60880
+			<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 ce60880
-	
Andrew Overholt ce60880
-	<target name="eclipse-test" description="Runs the specified classname as a plug-in test.">		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
+	<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 ce60880
+
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 ce60880
+
Andrew Overholt 465153c
 		
Andrew Overholt 465153c
 		<condition property="consolelog" value="-consolelog">
Andrew Overholt 465153c
 			<equals arg1="${application}" arg2="org.eclipse.test.coretestapplication"/>
Andrew Overholt ce60880
@@ -107,11 +128,11 @@
Andrew Overholt ce60880
 			<isset property="jvm" />
Andrew Overholt ce60880
 		</condition>
Andrew Overholt ce60880
 		<property name="test-vm" value="" />
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 		
Andrew Overholt ce60880
 		<chmod file="${eclipse-home}/eclipse" perm="ugo+rx"/>
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
Andrew Overholt ce60880
 
Andrew Overholt ce60880
 		<exec executable="${eclipse-home}/eclipse" dir="${eclipse-home}" timeout="${timeout}" logError="true" failonerror="false" output="${junit-report-output}/${classname}.txt">
Andrew Overholt ce60880
@@ -125,10 +146,12 @@
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 ce60880
-	
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 	<target name="collect-results">
Andrew Overholt ce60880
 		<dirname property="output-dir" file="${test-output}"/>
Andrew Overholt ce60880
 		<basename property="output-file-name" file="${test-output}"/>
Andrew Overholt ce60880
@@ -138,7 +161,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 ce60880
@@ -153,13 +176,13 @@
Andrew Overholt ce60880
 	<target name="collect">
Andrew Overholt ce60880
 		
Andrew Overholt ce60880
 			This target can be used to aggragate test runs from multiple test suites into a single report.
Andrew Overholt ce60880
-		
Andrew Overholt ce60880
+
Andrew Overholt ce60880
 			Parameters to this target:
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>