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