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 | 4551832 | 2021-03-21 22:53:25 +0100 | [diff] [blame] | 18 | <property name="junit-report-output" value="${test.root.dir}/results"/>
|
Stephan Herrmann | 5c45fe4 | 2015-10-22 20:56:39 +0200 | [diff] [blame] | 19 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 20 |
|
Stephan Herrmann | 9098514 | 2021-03-05 12:48:46 +0100 | [diff] [blame] | 21 | <target name="setupOTDTEclipse" unless="otdt-eclipse.is.setup"
|
Stephan Herrmann | 3b9c6ee | 2019-07-20 17:17:41 +0200 | [diff] [blame] | 22 | 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] | 23 | >
|
Stephan Herrmann | 3b9c6ee | 2019-07-20 17:17:41 +0200 | [diff] [blame] | 24 | <echo message="Installing OTDT into Test Eclipse..."/>
|
Stephan Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 25 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/>
|
| 26 |
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 27 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 34 | <!-- do install using p2: -->
|
Stephan Herrmann | 3110174 | 2019-05-23 19:11:12 +0200 | [diff] [blame] | 35 | <ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 36 |
|
| 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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 42 | 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 Herrmann | caee613 | 2022-05-03 16:49:39 +0200 | [diff] [blame] | 47 | <property name="library-file" value="${user.dir}/../releng/build-scripts/build/lib/library.xml"/>
|
Stephan Herrmann | edb0b20 | 2017-11-23 18:59:31 +0100 | [diff] [blame] | 48 | <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 Herrmann | c71f1c2 | 2021-03-05 00:30:11 +0100 | [diff] [blame] | 59 | --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
|
Stephan Herrmann | c55c933 | 2020-08-27 14:23:00 +0200 | [diff] [blame] | 60 | -Djava.io.tmpdir=${test.tmpDir} -Dot.weaving=otdre -javaagent:${otequinox.agent.jar}
|
Stephan Herrmann | 43e8845 | 2020-11-17 19:41:09 +0100 | [diff] [blame] | 61 | -Dcompliance=1.8,11,14"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 62 | </ant>
|
| 63 | </target>
|
| 64 |
|
| 65 | <target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests test.xml">
|
| 66 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 67 | <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] | 68 | </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 Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 73 | <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] | 74 | </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 Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 79 | <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] | 80 | </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 Herrmann | a1eeb30 | 2013-04-29 23:51:25 +0200 | [diff] [blame] | 85 | value="${test.root.dir}/library.xml"/>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 86 | <antcall target="runtests">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 87 | <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] | 88 | </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 Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 94 | <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] | 95 | </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 Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 100 | <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] | 101 | </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 Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 106 | <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] | 107 | </antcall>
|
| 108 | </target>
|
| 109 |
|
Stephan Herrmann | eb0f292 | 2018-08-09 13:27:26 +0200 | [diff] [blame] | 110 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 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">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 120 | <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] | 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">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 128 | <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] | 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">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 136 | <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] | 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">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 142 | <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] | 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">
|
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 148 | <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] | 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" />
|
Stephan Herrmann | eb0f292 | 2018-08-09 13:27:26 +0200 | [diff] [blame] | 167 | <antcall target="otequinox_tests" />
|
Stephan Herrmann | 16fd649 | 2019-03-05 19:28:47 +0100 | [diff] [blame] | 168 | <antcall target="otdt_builder_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 169 | <antcall target="jdt_builder_tests" />
|
| 170 | <antcall target="jdtcore_compiler_tests" />
|
| 171 | <antcall target="jdtcore_model_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 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" />
|
Stephan Herrmann | 16fd649 | 2019-03-05 19:28:47 +0100 | [diff] [blame] | 188 | <antcall target="otequinox_tests" />
|
| 189 | <antcall target="otdt_builder_tests" />
|
| 190 | <antcall target="jdt_builder_tests" />
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 191 | <antcall target="jdtcore_compiler_tests" />
|
| 192 | <antcall target="jdtcore_model_tests" />
|
Stephan Herrmann | d8c8165 | 2010-11-06 15:01:14 +0000 | [diff] [blame] | 193 | <!-- antcall target="otdt_metrics_tests" / -->
|
| 194 | <!--/parallel-->
|
| 195 | </target>
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 196 |
|
| 197 | <target name="onlyone">
|
Stephan Herrmann | 15a6fcd | 2019-09-03 13:15:39 +0200 | [diff] [blame] | 198 | <antcall target="otdt_tests" />
|
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 199 | </target>
|
| 200 |
|
| 201 | </project>
|