blob: 872eb06fa6768b18fea67639ae7d7e734cfd8f94 [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<!--
2 Copyright (c) 2010 Stephan Herrmann and others.
Stephan Herrmann35705382020-03-03 21:42:19 +01003 This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License 2.0
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00005 which accompanies this distribution, and is available at
Stephan Herrmann35705382020-03-03 21:42:19 +01006 https://www.eclipse.org/legal/epl-2.0/
7
8 SPDX-License-Identifier: EPL-2.0
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00009 Contributors:
10 Stephan Herrmann - initial API and implementation
11-->
12<project name="Automated Object Teams Testing" default="all" basedir="." >
13
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000014 <!--properties file containing the build information-->
15 <property file="src/label.properties" />
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010016 <property file="src/finalPluginsVersions.properties" />
Stephan Herrmannb2e5abd2015-10-29 17:26:56 +010017 <property name="otequinox.agent.jar" value="${test.root.dir}/eclipse/plugins/org.eclipse.objectteams.otequinox_${org.eclipse.objectteams.otequinox}/otequinoxAgent.jar"/>
Stephan Herrmann45518322021-03-21 22:53:25 +010018 <property name="junit-report-output" value="${test.root.dir}/results"/>
Stephan Herrmann5c45fe42015-10-22 20:56:39 +020019
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000020
Stephan Herrmann90985142021-03-05 12:48:46 +010021 <target name="setupOTDTEclipse" unless="otdt-eclipse.is.setup"
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +020022 description="Creates the SUT by and installing the OTDT into a pre-installed base Eclipse"
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000023 >
Stephan Herrmann3b9c6ee2019-07-20 17:17:41 +020024 <echo message="Installing OTDT into Test Eclipse..."/>
Stephan Herrmann31101742019-05-23 19:11:12 +020025 <ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/>
26
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000027 <property name="otdt-eclipse.is.setup" value="true"/>
28 </target>
29
30 <target name="setupTests" depends="setupOTDTEclipse" unless="tests.are.setup"
31 description="Installes the OTDT-Tests into the OTDT"
32 >
33 <echo message="Setting up tests in ${test.eclipseDir}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000034 <!-- do install using p2: -->
Stephan Herrmann31101742019-05-23 19:11:12 +020035 <ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000036
37 <property name="tests.are.setup" value="true"/>
38 </target>
39
40 <target name="runtests"
41 description="Runs ant on the test.xml for a specified plugin.
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000042 The property testPlugin represents a directory name made up of the plugin id and plugin version.
43 This directory must contain a valid test.xml."
44 >
45 <ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}">
46 <property name="eclipse-home" value="${test.eclipseDir}" />
Stephan Herrmanncaee6132022-05-03 16:49:39 +020047 <property name="library-file" value="${user.dir}/../releng/build-scripts/build/lib/library.xml"/>
Stephan Herrmannedb0b202017-11-23 18:59:31 +010048 <property name="extraVMargs" value="-XX:+HeapDumpOnOutOfMemoryError -ea --add-modules ALL-SYSTEM
49 --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
50 --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED
51 --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED
52 --add-opens java.security.jgss/sun.security.krb5.internal.ssl=ALL-UNNAMED
53 --add-opens java.base/jdk.internal.module=ALL-UNNAMED
54 --add-opens java.base/java.lang.module=ALL-UNNAMED
55 --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
56 --add-opens java.base/jdk.internal.ref=ALL-UNNAMED
57 --add-opens java.base/jdk.internal.math=ALL-UNNAMED
58 --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
Stephan Herrmannc71f1c22021-03-05 00:30:11 +010059 --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
Stephan Herrmannc55c9332020-08-27 14:23:00 +020060 -Djava.io.tmpdir=${test.tmpDir} -Dot.weaving=otdre -javaagent:${otequinox.agent.jar}
Stephan Herrmann43e88452020-11-17 19:41:09 +010061 -Dcompliance=1.8,11,14"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000062 </ant>
63 </target>
64
65 <target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests test.xml">
66 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010067 <param name="testPlugin" value="org.eclipse.objectteams.otdt.tests_${org.eclipse.objectteams.otdt.tests}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000068 </antcall>
69 </target>
70
71 <target name="jdtcore_compiler_tests" description="Runs the org.eclipse.jdt.core.tests.compiler test.xml">
72 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010073 <param name="testPlugin" value="org.eclipse.jdt.core.tests.compiler_${org.eclipse.jdt.core.tests.compiler}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000074 </antcall>
75 </target>
76
77 <target name="jdtcore_model_tests" description="Runs the org.eclipse.jdt.core.tests.model test.xml">
78 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010079 <param name="testPlugin" value="org.eclipse.jdt.core.tests.model_${org.eclipse.jdt.core.tests.model}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000080 </antcall>
81 </target>
82
83 <target name="jdt_builder_tests" description="Runs the org.eclipse.jdt.core.tests.builder test.xml">
84 <property name="library-file"
Stephan Herrmanna1eeb302013-04-29 23:51:25 +020085 value="${test.root.dir}/library.xml"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000086 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010087 <param name="testPlugin" value="org.eclipse.jdt.core.tests.builder_${org.eclipse.jdt.core.tests.builder}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000088 </antcall>
89 </target>
90
91
92 <target name="otdt_ui_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests test.xml">
93 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010094 <param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests_${org.eclipse.objectteams.otdt.ui.tests}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000095 </antcall>
96 </target>
97
98 <target name="otdt_dom_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.dom test.xml">
99 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100100 <param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.dom_${org.eclipse.objectteams.otdt.ui.tests.dom}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000101 </antcall>
102 </target>
103
104 <target name="otdt_ref_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.refactoring test.xml">
105 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100106 <param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.refactoring_${org.eclipse.objectteams.otdt.ui.tests.refactoring}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000107 </antcall>
108 </target>
109
Stephan Herrmanneb0f2922018-08-09 13:27:26 +0200110 <target name="otequinox_tests" description="Runs the OTEquinoxTests test.xml">
111 <antcall target="runtests">
112 <param name="testPlugin" value="OTEquinoxTests_${OTEquinoxTests}" />
113 </antcall>
114 </target>
115
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000116 <target name="jdt_ui_tests" description="Runs the org.eclipse.jdt.ui.tests test.xml">
Stephan Herrmann855fbd72010-09-28 16:00:49 +0000117 <property name="library-file"
Stephan Herrmanna1eeb302013-04-29 23:51:25 +0200118 value="${test.root.dir}/library.xml"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000119 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100120 <param name="testPlugin" value="org.eclipse.jdt.ui.tests_${org.eclipse.jdt.ui.tests}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000121 </antcall>
122 </target>
123
124 <target name="jdt_ref_tests" description="Runs the org.eclipse.jdt.ui.tests.refactoring test.xml">
Stephan Herrmann855fbd72010-09-28 16:00:49 +0000125 <property name="library-file"
Stephan Herrmanna1eeb302013-04-29 23:51:25 +0200126 value="${test.root.dir}/library.xml"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000127 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100128 <param name="testPlugin" value="org.eclipse.jdt.ui.tests.refactoring_${org.eclipse.jdt.ui.tests.refactoring}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000129 </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 Herrmanna1eeb302013-04-29 23:51:25 +0200134 value="${test.root.dir}/library.xml"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000135 <antcall target="runtests">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100136 <param name="testPlugin" value="org.eclipse.jdt.debug.tests_${org.eclipse.jdt.debug.tests}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000137 </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">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100142 <param name="testPlugin" value="org.eclipse.objectteams.otdt.debug.tests_${org.eclipse.objectteams.otdt.debug.tests}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000143 </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">
Stephan Herrmann32ed6af2014-01-05 02:44:25 +0100148 <param name="testPlugin" value="org.eclipse.objectteams.otdt.test.builder_${org.eclipse.objectteams.otdt.test.builder}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000149 </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 Herrmann5aecfe12010-05-03 23:53:54 +0000159 <!--parallel threadCount="2"-->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000160 <!-- "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" />
Stephan Herrmanneb0f2922018-08-09 13:27:26 +0200167 <antcall target="otequinox_tests" />
Stephan Herrmann16fd6492019-03-05 19:28:47 +0100168 <antcall target="otdt_builder_tests" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000169 <antcall target="jdt_builder_tests" />
170 <antcall target="jdtcore_compiler_tests" />
171 <antcall target="jdtcore_model_tests" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000172 <!-- antcall target="otdt_metrics_tests" / -->
Stephan Herrmann5aecfe12010-05-03 23:53:54 +0000173 <!--/parallel-->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000174 </target>
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000175
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" />
Stephan Herrmann16fd6492019-03-05 19:28:47 +0100188 <antcall target="otequinox_tests" />
189 <antcall target="otdt_builder_tests" />
190 <antcall target="jdt_builder_tests" />
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000191 <antcall target="jdtcore_compiler_tests" />
192 <antcall target="jdtcore_model_tests" />
Stephan Herrmannd8c81652010-11-06 15:01:14 +0000193 <!-- antcall target="otdt_metrics_tests" / -->
194 <!--/parallel-->
195 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000196
197 <target name="onlyone">
Stephan Herrmann15a6fcd2019-09-03 13:15:39 +0200198 <antcall target="otdt_tests" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000199 </target>
200
201</project>