Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <!--
|
| 2 | Copyright (c) 2010 Stephan Herrmann and others.
|
| 3 | All rights reserved. This program and the accompanying materials
|
| 4 | are made available under the terms of the Eclipse Public License v1.0
|
| 5 | which accompanies this distribution, and is available at
|
| 6 | http://www.eclipse.org/legal/epl-v10.html
|
| 7 |
|
| 8 | Contributors:
|
| 9 | Stephan Herrmann - initial API and implementation
|
| 10 | -->
|
| 11 | <project name="Automated Object Teams Testing" default="all" basedir="." >
|
| 12 |
|
| 13 | <!--properties file containing the plugin directory name including version number-->
|
| 14 | <dirname property="_myDir" file="${ant.file}"/>
|
| 15 | <property file="${_myDir}/test.properties" />
|
| 16 |
|
| 17 | <!--properties file containing the build information-->
|
| 18 | <property file="src/label.properties" />
|
| 19 |
|
| 20 | <target name="readFlags">
|
| 21 | <condition property="really.build.all">
|
| 22 | <istrue value="${do.build.all}"/>
|
| 23 | </condition>
|
| 24 | </target>
|
| 25 |
|
| 26 | <target name="checkFlags" depends="readFlags" unless="really.build.all">
|
| 27 | <property name="otdt-eclipse.is.setup" value="true"/>
|
| 28 | <property name="tests.are.setup" value="true"/>
|
| 29 | </target>
|
| 30 |
|
| 31 | <target name="setupOTDTEclipse" depends="checkFlags" unless="otdt-eclipse.is.setup"
|
| 32 | description="Creates the SUT by extracting a fresh Eclipse SDK and installing the OTDT into it"
|
| 33 | >
|
| 34 | <echo message="### Build Test Eclipse ###"/>
|
| 35 | <echo message="Extracting Eclipse..."/>
|
| 36 | <untar compression="gzip" src="${eclipse-app.tgz}" dest="${test.root.dir}"/>
|
| 37 |
|
| 38 | <echo message="Installing OTDT..."/>
|
| 39 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/>
|
| 40 |
|
| 41 | <property name="otdt-eclipse.is.setup" value="true"/>
|
| 42 | </target>
|
| 43 |
|
| 44 | <target name="setupTests" depends="setupOTDTEclipse" unless="tests.are.setup"
|
| 45 | description="Installes the OTDT-Tests into the OTDT"
|
| 46 | >
|
| 47 | <echo message="Setting up tests in ${test.eclipseDir}"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 48 | <!-- do install using p2: -->
|
| 49 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/>
|
| 50 |
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 51 | <echo message="get library.xml"/>
|
| 52 | <get src="http://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/plain/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/library.xml"
|
Stephan Herrmann | bc2361b | 2013-04-30 00:34:57 +0200 | [diff] [blame] | 53 | dest="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 54 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 55 | <property name="tests.are.setup" value="true"/>
|
| 56 | </target>
|
| 57 |
|
| 58 | <target name="runtests"
|
| 59 | description="Runs ant on the test.xml for a specified plugin.
|
| 60 | Requires a property value setting for testPlugin only if test.properties is not available.
|
| 61 | The property testPlugin represents a directory name made up of the plugin id and plugin version.
|
| 62 | This directory must contain a valid test.xml."
|
| 63 | >
|
| 64 | <ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}">
|
| 65 | <property name="eclipse-home" value="${test.eclipseDir}" />
|
Stephan Herrmann | f71123a | 2013-04-30 01:18:01 +0200 | [diff] [blame^] | 66 | <property name="library-file" value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | 56428e9 | 2013-02-23 12:29:56 +0100 | [diff] [blame] | 67 | <property name="extraVMargs" value="-XX:MaxPermSize=320m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=${test.tmpDir}"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 68 | </ant>
|
| 69 | </target>
|
| 70 |
|
| 71 | <target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests test.xml">
|
| 72 | <antcall target="runtests">
|
| 73 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.tests}" />
|
| 74 | </antcall>
|
| 75 | </target>
|
| 76 |
|
| 77 | <target name="jdtcore_compiler_tests" description="Runs the org.eclipse.jdt.core.tests.compiler test.xml">
|
| 78 | <antcall target="runtests">
|
| 79 | <param name="testPlugin" value="${org.eclipse.jdt.core.tests.compiler}" />
|
| 80 | </antcall>
|
| 81 | </target>
|
| 82 |
|
| 83 | <target name="jdtcore_model_tests" description="Runs the org.eclipse.jdt.core.tests.model test.xml">
|
| 84 | <antcall target="runtests">
|
| 85 | <param name="testPlugin" value="${org.eclipse.jdt.core.tests.model}" />
|
| 86 | </antcall>
|
| 87 | </target>
|
| 88 |
|
| 89 | <target name="jdt_builder_tests" description="Runs the org.eclipse.jdt.core.tests.builder test.xml">
|
| 90 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 91 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 92 | <antcall target="runtests">
|
| 93 | <param name="testPlugin" value="${org.eclipse.jdt.core.tests.builder}" />
|
| 94 | </antcall>
|
| 95 | </target>
|
| 96 |
|
| 97 |
|
| 98 | <target name="otdt_ui_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests test.xml">
|
| 99 | <antcall target="runtests">
|
| 100 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.ui.tests}" />
|
| 101 | </antcall>
|
| 102 | </target>
|
| 103 |
|
| 104 | <target name="otdt_dom_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.dom test.xml">
|
| 105 | <antcall target="runtests">
|
| 106 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.ui.tests.dom}" />
|
| 107 | </antcall>
|
| 108 | </target>
|
| 109 |
|
| 110 | <target name="otdt_ref_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.refactoring test.xml">
|
| 111 | <antcall target="runtests">
|
| 112 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.ui.tests.refactoring}" />
|
| 113 | </antcall>
|
| 114 | </target>
|
| 115 |
|
| 116 | <target name="jdt_ui_tests" description="Runs the org.eclipse.jdt.ui.tests test.xml">
|
Stephan Herrmann | 855fbd7 | 2010-09-28 16:00:49 +0000 | [diff] [blame] | 117 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 118 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 119 | <antcall target="runtests">
|
| 120 | <param name="testPlugin" value="${org.eclipse.jdt.ui.tests}" />
|
| 121 | </antcall>
|
| 122 | </target>
|
| 123 |
|
| 124 | <target name="jdt_ref_tests" description="Runs the org.eclipse.jdt.ui.tests.refactoring test.xml">
|
Stephan Herrmann | 855fbd7 | 2010-09-28 16:00:49 +0000 | [diff] [blame] | 125 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 126 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 127 | <antcall target="runtests">
|
| 128 | <param name="testPlugin" value="${org.eclipse.jdt.ui.tests.refactoring}" />
|
| 129 | </antcall>
|
| 130 | </target>
|
| 131 |
|
| 132 | <target name="jdt_debug_tests" description="Runs the org.eclipse.jdt.debug.tests test.xml">
|
| 133 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 134 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 135 | <antcall target="runtests">
|
| 136 | <param name="testPlugin" value="${org.eclipse.jdt.debug.tests}" />
|
| 137 | </antcall>
|
| 138 | </target>
|
| 139 |
|
| 140 | <target name="otdt_debug_tests" description="Runs the org.eclipse.objectteams.otdt.debug.tests test.xml">
|
| 141 | <antcall target="runtests">
|
| 142 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.debug.tests}" />
|
| 143 | </antcall>
|
| 144 | </target>
|
| 145 |
|
| 146 | <target name="otdt_builder_tests" description="Runs the org.eclipse.objectteams.otdt.test.builder test.xml">
|
| 147 | <antcall target="runtests">
|
| 148 | <param name="testPlugin" value="${org.eclipse.objectteams.otdt.test.builder}" />
|
| 149 | </antcall>
|
| 150 | </target>
|
| 151 |
|
| 152 | <target name="all">
|
| 153 | <!-- enable if we want to debug otre/otequinox:
|
| 154 | <property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
|
| 155 | -->
|
| 156 | <!-- debug tests don't like parallelization -->
|
| 157 | <antcall target="jdt_debug_tests" />
|
| 158 | <antcall target="otdt_debug_tests" />
|
Stephan Herrmann | 5aecfe1 | 2010-05-03 23:53:54 +0000 | [diff] [blame] | 159 | <!--parallel threadCount="2"-->
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 160 | <!-- "slow", ui tests come first -->
|
| 161 | <antcall target="jdt_ref_tests" />
|
| 162 | <antcall target="jdt_ui_tests" />
|
| 163 | <antcall target="otdt_ui_tests" />
|
| 164 | <antcall target="otdt_ref_tests" />
|
| 165 | <antcall target="otdt_dom_tests" />
|
| 166 | <antcall target="otdt_tests" />
|
| 167 | <antcall target="jdt_builder_tests" />
|
| 168 | <antcall target="jdtcore_compiler_tests" />
|
| 169 | <antcall target="jdtcore_model_tests" />
|
| 170 | <antcall target="otdt_builder_tests" />
|
| 171 | <!-- antcall target="otdt_metrics_tests" / -->
|
Stephan Herrmann | 5aecfe1 | 2010-05-03 23:53:54 +0000 | [diff] [blame] | 172 | <!--/parallel-->
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 173 | </target>
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 174 |
|
| 175 | <target name="otdt-tests">
|
| 176 | <!-- enable if we want to debug otre/otequinox:
|
| 177 | <property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
|
| 178 | -->
|
| 179 | <!-- debug tests don't like parallelization -->
|
| 180 | <antcall target="otdt_debug_tests" />
|
| 181 | <!--parallel threadCount="2"-->
|
| 182 | <!-- "slow", ui tests come first -->
|
| 183 | <antcall target="otdt_ui_tests" />
|
| 184 | <antcall target="otdt_ref_tests" />
|
| 185 | <antcall target="otdt_dom_tests" />
|
| 186 | <antcall target="otdt_tests" />
|
| 187 | <antcall target="jdt_builder_tests" />
|
| 188 | <antcall target="jdtcore_compiler_tests" />
|
| 189 | <antcall target="jdtcore_model_tests" />
|
| 190 | <antcall target="otdt_builder_tests" />
|
| 191 | <!-- antcall target="otdt_metrics_tests" / -->
|
| 192 | <!--/parallel-->
|
| 193 | </target>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 194 |
|
| 195 | <target name="onlyone">
|
| 196 | <antcall target="otdt_ui_tests" />
|
| 197 | </target>
|
| 198 |
|
| 199 | </project>
|