Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <!--
|
| 2 | Copyright (c) 2010 Stephan Herrmann and others.
|
Stephan Herrmann | 3570538 | 2020-03-03 21:42:19 +0100 | [diff] [blame] | 3 | This program and the accompanying materials
|
| 4 | are made available under the terms of the Eclipse Public License 2.0
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 5 | which accompanies this distribution, and is available at
|
Stephan Herrmann | 3570538 | 2020-03-03 21:42:19 +0100 | [diff] [blame] | 6 | https://www.eclipse.org/legal/epl-2.0/
|
| 7 |
|
| 8 | SPDX-License-Identifier: EPL-2.0
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 9 | Contributors:
|
| 10 | Stephan Herrmann - initial API and implementation
|
| 11 | -->
|
| 12 | <project name="Automated Object Teams Testing" default="all" basedir="." >
|
| 13 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 14 | <!--properties file containing the build information-->
|
| 15 | <property file="src/label.properties" />
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 16 | <property file="src/finalPluginsVersions.properties" />
|
Stephan Herrmann | b2e5abd | 2015-10-29 17:26:56 +0100 | [diff] [blame] | 17 | <property name="otequinox.agent.jar" value="${test.root.dir}/eclipse/plugins/org.eclipse.objectteams.otequinox_${org.eclipse.objectteams.otequinox}/otequinoxAgent.jar"/>
|
Stephan Herrmann | 5c45fe4 | 2015-10-22 20:56:39 +0200 | [diff] [blame] | 18 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 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"
|
Stephan Herrmann | 3b9c6ee | 2019-07-20 17:17:41 +0200 | [diff] [blame] | 32 | description="Creates the SUT by and installing the OTDT into a pre-installed base Eclipse"
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 33 | >
|
Stephan Herrmann | 3b9c6ee | 2019-07-20 17:17:41 +0200 | [diff] [blame] | 34 | <echo message="Installing OTDT into Test Eclipse..."/>
|
Stephan Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 35 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/>
|
| 36 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 37 | <property name="otdt-eclipse.is.setup" value="true"/>
|
| 38 | </target>
|
| 39 |
|
| 40 | <target name="setupTests" depends="setupOTDTEclipse" unless="tests.are.setup"
|
| 41 | description="Installes the OTDT-Tests into the OTDT"
|
| 42 | >
|
| 43 | <echo message="Setting up tests in ${test.eclipseDir}"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 44 | <!-- do install using p2: -->
|
Stephan Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 45 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 46 |
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 47 | <echo message="get library.xml"/>
|
Stephan Herrmann | 805fe20 | 2020-01-14 14:13:37 +0100 | [diff] [blame] | 48 | <get src="https://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] | 49 | dest="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 50 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 51 | <property name="tests.are.setup" value="true"/>
|
| 52 | </target>
|
| 53 |
|
| 54 | <target name="runtests"
|
| 55 | description="Runs ant on the test.xml for a specified plugin.
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 56 | The property testPlugin represents a directory name made up of the plugin id and plugin version.
|
| 57 | This directory must contain a valid test.xml."
|
| 58 | >
|
| 59 | <ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}">
|
| 60 | <property name="eclipse-home" value="${test.eclipseDir}" />
|
Stephan Herrmann | f71123a | 2013-04-30 01:18:01 +0200 | [diff] [blame] | 61 | <property name="library-file" value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | edb0b20 | 2017-11-23 18:59:31 +0100 | [diff] [blame] | 62 | <property name="extraVMargs" value="-XX:+HeapDumpOnOutOfMemoryError -ea --add-modules ALL-SYSTEM
|
| 63 | --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
|
| 64 | --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED
|
| 65 | --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED
|
| 66 | --add-opens java.security.jgss/sun.security.krb5.internal.ssl=ALL-UNNAMED
|
| 67 | --add-opens java.base/jdk.internal.module=ALL-UNNAMED
|
| 68 | --add-opens java.base/java.lang.module=ALL-UNNAMED
|
| 69 | --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
|
| 70 | --add-opens java.base/jdk.internal.ref=ALL-UNNAMED
|
| 71 | --add-opens java.base/jdk.internal.math=ALL-UNNAMED
|
| 72 | --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
|
Stephan Herrmann | 46b5f59 | 2019-09-01 00:54:24 +0200 | [diff] [blame] | 73 | -Djava.io.tmpdir=${test.tmpDir} -Dot.weaving=otdre -javaagent:${otequinox.agent.jar}
|
Stephan Herrmann | ca66d6c | 2019-09-07 23:17:49 +0200 | [diff] [blame] | 74 | -Dcompliance=1.7,1.8,12"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 75 | </ant>
|
| 76 | </target>
|
| 77 |
|
| 78 | <target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests 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.objectteams.otdt.tests_${org.eclipse.objectteams.otdt.tests}" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 81 | </antcall>
|
| 82 | </target>
|
| 83 |
|
| 84 | <target name="jdtcore_compiler_tests" description="Runs the org.eclipse.jdt.core.tests.compiler 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.compiler_${org.eclipse.jdt.core.tests.compiler}" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 87 | </antcall>
|
| 88 | </target>
|
| 89 |
|
| 90 | <target name="jdtcore_model_tests" description="Runs the org.eclipse.jdt.core.tests.model test.xml">
|
| 91 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 92 | <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] | 93 | </antcall>
|
| 94 | </target>
|
| 95 |
|
| 96 | <target name="jdt_builder_tests" description="Runs the org.eclipse.jdt.core.tests.builder test.xml">
|
| 97 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 98 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 99 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 100 | <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] | 101 | </antcall>
|
| 102 | </target>
|
| 103 |
|
| 104 |
|
| 105 | <target name="otdt_ui_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests 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_${org.eclipse.objectteams.otdt.ui.tests}" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 108 | </antcall>
|
| 109 | </target>
|
| 110 |
|
| 111 | <target name="otdt_dom_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.dom 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.dom_${org.eclipse.objectteams.otdt.ui.tests.dom}" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 114 | </antcall>
|
| 115 | </target>
|
| 116 |
|
| 117 | <target name="otdt_ref_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.refactoring test.xml">
|
| 118 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 119 | <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] | 120 | </antcall>
|
| 121 | </target>
|
| 122 |
|
Stephan Herrmann | eb0f292 | 2018-08-09 13:27:26 +0200 | [diff] [blame] | 123 | <target name="otequinox_tests" description="Runs the OTEquinoxTests test.xml">
|
| 124 | <antcall target="runtests">
|
| 125 | <param name="testPlugin" value="OTEquinoxTests_${OTEquinoxTests}" />
|
| 126 | </antcall>
|
| 127 | </target>
|
| 128 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 129 | <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] | 130 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 131 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 132 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 133 | <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] | 134 | </antcall>
|
| 135 | </target>
|
| 136 |
|
| 137 | <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] | 138 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 139 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 140 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 141 | <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] | 142 | </antcall>
|
| 143 | </target>
|
| 144 |
|
| 145 | <target name="jdt_debug_tests" description="Runs the org.eclipse.jdt.debug.tests test.xml">
|
| 146 | <property name="library-file"
|
Stephan Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 147 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 148 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 149 | <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] | 150 | </antcall>
|
| 151 | </target>
|
| 152 |
|
| 153 | <target name="otdt_debug_tests" description="Runs the org.eclipse.objectteams.otdt.debug.tests test.xml">
|
| 154 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 155 | <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] | 156 | </antcall>
|
| 157 | </target>
|
| 158 |
|
| 159 | <target name="otdt_builder_tests" description="Runs the org.eclipse.objectteams.otdt.test.builder test.xml">
|
| 160 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 161 | <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] | 162 | </antcall>
|
| 163 | </target>
|
| 164 |
|
| 165 | <target name="all">
|
| 166 | <!-- enable if we want to debug otre/otequinox:
|
| 167 | <property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
|
| 168 | -->
|
| 169 | <!-- debug tests don't like parallelization -->
|
| 170 | <antcall target="jdt_debug_tests" />
|
| 171 | <antcall target="otdt_debug_tests" />
|
Stephan Herrmann | 5aecfe1 | 2010-05-03 23:53:54 +0000 | [diff] [blame] | 172 | <!--parallel threadCount="2"-->
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 173 | <!-- "slow", ui tests come first -->
|
| 174 | <antcall target="jdt_ref_tests" />
|
| 175 | <antcall target="jdt_ui_tests" />
|
| 176 | <antcall target="otdt_ui_tests" />
|
| 177 | <antcall target="otdt_ref_tests" />
|
| 178 | <antcall target="otdt_dom_tests" />
|
| 179 | <antcall target="otdt_tests" />
|
Stephan Herrmann | eb0f292 | 2018-08-09 13:27:26 +0200 | [diff] [blame] | 180 | <antcall target="otequinox_tests" />
|
Stephan Herrmann | 16fd649 | 2019-03-05 19:28:47 +0100 | [diff] [blame] | 181 | <antcall target="otdt_builder_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 182 | <antcall target="jdt_builder_tests" />
|
| 183 | <antcall target="jdtcore_compiler_tests" />
|
| 184 | <antcall target="jdtcore_model_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 185 | <!-- antcall target="otdt_metrics_tests" / -->
|
Stephan Herrmann | 5aecfe1 | 2010-05-03 23:53:54 +0000 | [diff] [blame] | 186 | <!--/parallel-->
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 187 | </target>
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 188 |
|
| 189 | <target name="otdt-tests">
|
| 190 | <!-- enable if we want to debug otre/otequinox:
|
| 191 | <property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" />
|
| 192 | -->
|
| 193 | <!-- debug tests don't like parallelization -->
|
| 194 | <antcall target="otdt_debug_tests" />
|
| 195 | <!--parallel threadCount="2"-->
|
| 196 | <!-- "slow", ui tests come first -->
|
| 197 | <antcall target="otdt_ui_tests" />
|
| 198 | <antcall target="otdt_ref_tests" />
|
| 199 | <antcall target="otdt_dom_tests" />
|
| 200 | <antcall target="otdt_tests" />
|
Stephan Herrmann | 16fd649 | 2019-03-05 19:28:47 +0100 | [diff] [blame] | 201 | <antcall target="otequinox_tests" />
|
| 202 | <antcall target="otdt_builder_tests" />
|
| 203 | <antcall target="jdt_builder_tests" />
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 204 | <antcall target="jdtcore_compiler_tests" />
|
| 205 | <antcall target="jdtcore_model_tests" />
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 206 | <!-- antcall target="otdt_metrics_tests" / -->
|
| 207 | <!--/parallel-->
|
| 208 | </target>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 209 |
|
| 210 | <target name="onlyone">
|
Stephan Herrmann | 15a6fcd | 2019-09-03 13:15:39 +0200 | [diff] [blame] | 211 | <antcall target="otdt_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 212 | </target>
|
| 213 |
|
| 214 | </project>
|