carbidecpp22devenv/plugins/org.eclipse.test_3.2.0/library.xml
author cawthron
Fri, 04 Dec 2009 12:07:34 -0600
changeset 743 8904a07888bd
parent 637 0c11af94aac6
permissions -rw-r--r--
add files for RCL_2_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
637
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     1
<?xml version="1.0"?>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     2
<project name="Library" default="usage" basedir=".">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     3
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     4
	<target name="usage">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     5
		<echo message="Please refer to the testframework.html in org.eclipse.test for instructions on usage." />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     6
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     7
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     8
	<target name="init">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
     9
		<!-- 
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    10
			Parameters:
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    11
				(Mandatory)
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    12
				data-dir		- the directory for Eclipse to write its data
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    13
				plugin-name		- the name of the plugin to test
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    14
				classname		- the name of the test class
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    15
				
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    16
				(Optional - overrides defaults set in script)
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    17
				vmargs			- a string containing arguments to pass to the VM.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    18
				extraVMargs		- allows separate setting of VM args from separate caller.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    19
				timeout			- overrides default test timeout value (in milliseconds).
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    20
				test-output		- overrides default output file produced from test run.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    21
				plugin-path		- path to root of plug-in
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    22
				useEclipseExe	- property setting forces test to launch via eclipse executable.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    23
				junit-report-output - output directory for junit reports produced for specified classname.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    24
		-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    25
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    26
	  	<tstamp>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    27
	        <format property="TIMENOW" pattern="HHmmssSSSS"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    28
	    </tstamp>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    29
		<!--property setting useEclipseExe launches tests using the eclipse executable-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    30
		<condition property="launchTarget" value="eclipse-test">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    31
			<isset property="useEclipseExe" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    32
		</condition>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    33
		<!--default launch target for launching tests-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    34
		<property name="launchTarget" value="java-test" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    35
		<property name="formatter" value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    36
	    
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    37
		<!--default heap sizes when running performance tests-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    38
	    <condition property="vmargs" value=" -Xms256M -Xmx256M">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    39
			<equals arg1="${test.target}" arg2="performance" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    40
	    </condition>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    41
		<property name="extraVMargs" value=""/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    42
		<property name="plugin-path" value="" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    43
		<property name="timeout" value="7200000" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    44
		<property name="test-output" value="${eclipse-home}/${classname}.xml" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    45
		<property name="junit-report-output" value="${eclipse-home}/results" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    46
		<mkdir dir="${junit-report-output}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    47
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    48
	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    49
	<target name="core-test" description="Eclipse application used to launch HEADLESS plugin tests." depends="init">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    50
		<antcall target="${launchTarget}">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    51
			<param name="application" value="org.eclipse.test.coretestapplication"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    52
		</antcall>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    53
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    54
	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    55
	<target name="ui-test" description="Eclipse application used to launch UI plugin tests." depends="init">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    56
		<antcall target="${launchTarget}">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    57
			<param name="application" value="org.eclipse.test.uitestapplication"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    58
		</antcall>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    59
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    60
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    61
	<target name="java-test">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    62
		<!--default vm args-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    63
		<property name="vmargs" value=" -Xms40m -Xmx256m"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    64
	  	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    65
	  	<!--set default jvm to use for testing-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    66
	   	<property name="jvm" value="${java.home}/bin/java" />  	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    67
	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    68
		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    69
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    70
		<java fork="true" dir="." timeout="${timeout}" jvm="${jvm}" logError="true"
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    71
			classname="org.eclipse.core.launcher.Main" output="${junit-report-output}/${classname}.txt">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    72
	        <classpath>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    73
	    		<fileset dir="${eclipse-home}/plugins">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    74
	            	<include name="org.eclipse.equinox.launcher_*.jar"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    75
	          	</fileset>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    76
	        </classpath>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    77
		    <arg line="-application ${application}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    78
		    <arg line="-data ${data-dir}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    79
		    <arg line="formatter=${formatter},${test-output}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    80
		    <arg line="-testPluginName ${plugin-name}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    81
		    <arg line="-className ${classname}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    82
		    <arg line="-os ${os}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    83
		    <arg line="-ws ${ws}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    84
		    <arg line="-arch ${arch}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    85
		    <arg line="-consolelog"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    86
		    <jvmarg line="${vmargs} ${extraVMargs}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    87
		    <sysproperty key="PLUGIN_PATH" value="${plugin-path}"/> 
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    88
		</java>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    89
		<antcall target="collect-results" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    90
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    91
	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    92
	<target name="eclipse-test" description="Runs the specified classname as a plug-in test.">		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    93
		<property name="vmargs" value="-Xms256m -Xmx512m"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    94
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    95
		<!--use -consolelog if launching a headless test-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    96
		<condition property="consolelog" value="-consolelog">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    97
			<equals arg1="${application}" arg2="org.eclipse.test.coretestapplication"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    98
		</condition>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
    99
		<property name="consolelog" value="" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   100
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   101
		<!--
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   102
			vm selection priority:
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   103
			1.  user-specified java executable via outer Ant property setting of "jvm".
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   104
			2.  java executable on path.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   105
		-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   106
		<condition property="test-vm" value="-vm ${jvm}">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   107
			<isset property="jvm" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   108
		</condition>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   109
		<property name="test-vm" value="" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   110
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   111
		<!--ensure executable has execute permission-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   112
		<chmod file="${eclipse-home}/eclipse" perm="ugo+rx"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   113
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   114
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   115
		<echo message="Running ${classname}. Result file: ${junit-report-output}/${classname}.xml."/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   116
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   117
		<exec executable="${eclipse-home}/eclipse" dir="${eclipse-home}" timeout="${timeout}" logError="true" failonerror="false" output="${junit-report-output}/${classname}.txt">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   118
			<arg line="-data ${data-dir}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   119
			<arg line="${test-vm}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   120
			<arg line="-application ${application}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   121
			<arg line="formatter=${formatter},${test-output}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   122
			<arg line="-testPluginName ${plugin-name}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   123
			<arg line="-className ${classname}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   124
			<arg line="-nosplash"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   125
			<arg line="--launcher.suppressErrors"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   126
			<arg line="${consolelog}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   127
			<arg line="-vmargs ${vmargs} ${extraVMargs} -DPLUGIN_PATH=${plugin-path}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   128
		</exec>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   129
		<antcall target="collect-results" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   130
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   131
	
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   132
	<target name="collect-results">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   133
		<dirname property="output-dir" file="${test-output}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   134
		<basename property="output-file-name" file="${test-output}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   135
		<junitreport todir="${junit-report-output}" tofile="${classname}.xml">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   136
			<fileset dir="${output-dir}">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   137
				<include name="${output-file-name}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   138
			</fileset>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   139
		</junitreport>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   140
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   141
		<style style="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   142
			basedir="${junit-report-output}"
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   143
			includes="${classname}.result.xml"
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   144
			destdir="${junit-report-output}" />
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   145
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   146
		<!--save .log content and *.log content from configuration directory-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   147
		<concat destfile="${junit-report-output}/${classname}.log">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   148
			<fileset dir="${eclipse-home}" includes="${data-dir}/.metadata/*.log"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   149
			<fileset dir="${eclipse-home}" includes="configuration/*.log"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   150
		</concat>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   151
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   152
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   153
	<target name="collect">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   154
		<!--
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   155
			This target can be used to aggragate test runs from multiple test suites into a single report.
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   156
		
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   157
			Parameters to this target:
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   158
			includes		- the names of the files to include
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   159
			output-file		- the name of the output file to produce
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   160
		-->
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   161
		<junitreport todir="." tofile="${output-file}">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   162
			<fileset dir=".">
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   163
				<include name="${includes}"/>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   164
			</fileset>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   165
		</junitreport>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   166
	</target>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   167
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   168
</project>
0c11af94aac6 add files for RCL_2_2
cawthron
parents:
diff changeset
   169