<!-- | |
Copyright (c) 2010 Stephan Herrmann and others. | |
This program and the accompanying materials | |
are made available under the terms of the Eclipse Public License 2.0 | |
which accompanies this distribution, and is available at | |
https://www.eclipse.org/legal/epl-2.0/ | |
SPDX-License-Identifier: EPL-2.0 | |
Contributors: | |
Stephan Herrmann - initial API and implementation | |
--> | |
<project name="Automated Object Teams Testing" default="all" basedir="." > | |
<!--properties file containing the build information--> | |
<property file="src/label.properties" /> | |
<property file="src/finalPluginsVersions.properties" /> | |
<property name="otequinox.agent.jar" value="${test.root.dir}/eclipse/plugins/org.eclipse.objectteams.otequinox_${org.eclipse.objectteams.otequinox}/otequinoxAgent.jar"/> | |
<property name="junit-report-output" value="${test.root.dir}/results"/> | |
<target name="setupOTDTEclipse" unless="otdt-eclipse.is.setup" | |
description="Creates the SUT by and installing the OTDT into a pre-installed base Eclipse" | |
> | |
<echo message="Installing OTDT into Test Eclipse..."/> | |
<ant antfile="${OTScriptDir}/p2helper.xml" target="installOTDT" dir="${test.eclipseDir}"/> | |
<property name="otdt-eclipse.is.setup" value="true"/> | |
</target> | |
<target name="setupTests" depends="setupOTDTEclipse" unless="tests.are.setup" | |
description="Installes the OTDT-Tests into the OTDT" | |
> | |
<echo message="Setting up tests in ${test.eclipseDir}"/> | |
<!-- do install using p2: --> | |
<ant antfile="${OTScriptDir}/p2helper.xml" target="installTests" dir="${test.eclipseDir}"/> | |
<property name="tests.are.setup" value="true"/> | |
</target> | |
<target name="runtests" | |
description="Runs ant on the test.xml for a specified plugin. | |
The property testPlugin represents a directory name made up of the plugin id and plugin version. | |
This directory must contain a valid test.xml." | |
> | |
<ant antfile="plugins/${testPlugin}/test.xml" dir="${test.eclipseDir}"> | |
<property name="eclipse-home" value="${test.eclipseDir}" /> | |
<property name="library-file" value="${user.dir}/../releng/build-scripts/build/lib/library.xml"/> | |
<property name="extraVMargs" value="-XX:+HeapDumpOnOutOfMemoryError -ea --add-modules ALL-SYSTEM | |
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED | |
--add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED | |
--add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED | |
--add-opens java.security.jgss/sun.security.krb5.internal.ssl=ALL-UNNAMED | |
--add-opens java.base/jdk.internal.module=ALL-UNNAMED | |
--add-opens java.base/java.lang.module=ALL-UNNAMED | |
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED | |
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED | |
--add-opens java.base/jdk.internal.math=ALL-UNNAMED | |
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED | |
--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED | |
-Djava.io.tmpdir=${test.tmpDir} -Dot.weaving=otdre -javaagent:${otequinox.agent.jar} | |
-Dcompliance=1.8,11,17,19"/> | |
</ant> | |
</target> | |
<target name="otdt_tests" description="Runs the org.eclipse.objectteams.otdt.tests test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.tests_${org.eclipse.objectteams.otdt.tests}" /> | |
</antcall> | |
</target> | |
<target name="jdtcore_compiler_tests" description="Runs the org.eclipse.jdt.core.tests.compiler test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.core.tests.compiler_${org.eclipse.jdt.core.tests.compiler}" /> | |
</antcall> | |
</target> | |
<target name="jdtcore_model_tests" description="Runs the org.eclipse.jdt.core.tests.model test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.core.tests.model_${org.eclipse.jdt.core.tests.model}" /> | |
</antcall> | |
</target> | |
<target name="jdt_builder_tests" description="Runs the org.eclipse.jdt.core.tests.builder test.xml"> | |
<property name="library-file" | |
value="${test.root.dir}/library.xml"/> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.core.tests.builder_${org.eclipse.jdt.core.tests.builder}" /> | |
</antcall> | |
</target> | |
<target name="otdt_ui_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests_${org.eclipse.objectteams.otdt.ui.tests}" /> | |
</antcall> | |
</target> | |
<target name="otdt_dom_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.dom test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.dom_${org.eclipse.objectteams.otdt.ui.tests.dom}" /> | |
</antcall> | |
</target> | |
<target name="otdt_ref_tests" description="Runs the org.eclipse.objectteams.otdt.ui.tests.refactoring test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.ui.tests.refactoring_${org.eclipse.objectteams.otdt.ui.tests.refactoring}" /> | |
</antcall> | |
</target> | |
<target name="otequinox_tests" description="Runs the OTEquinoxTests test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="OTEquinoxTests_${OTEquinoxTests}" /> | |
</antcall> | |
</target> | |
<target name="jdt_ui_tests" description="Runs the org.eclipse.jdt.ui.tests test.xml"> | |
<property name="library-file" | |
value="${test.root.dir}/library.xml"/> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.ui.tests_${org.eclipse.jdt.ui.tests}" /> | |
</antcall> | |
</target> | |
<target name="jdt_ref_tests" description="Runs the org.eclipse.jdt.ui.tests.refactoring test.xml"> | |
<property name="library-file" | |
value="${test.root.dir}/library.xml"/> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.ui.tests.refactoring_${org.eclipse.jdt.ui.tests.refactoring}" /> | |
</antcall> | |
</target> | |
<target name="jdt_debug_tests" description="Runs the org.eclipse.jdt.debug.tests test.xml"> | |
<property name="library-file" | |
value="${test.root.dir}/library.xml"/> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.jdt.debug.tests_${org.eclipse.jdt.debug.tests}" /> | |
</antcall> | |
</target> | |
<target name="otdt_debug_tests" description="Runs the org.eclipse.objectteams.otdt.debug.tests test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.debug.tests_${org.eclipse.objectteams.otdt.debug.tests}" /> | |
</antcall> | |
</target> | |
<target name="otdt_builder_tests" description="Runs the org.eclipse.objectteams.otdt.test.builder test.xml"> | |
<antcall target="runtests"> | |
<param name="testPlugin" value="org.eclipse.objectteams.otdt.test.builder_${org.eclipse.objectteams.otdt.test.builder}" /> | |
</antcall> | |
</target> | |
<target name="all"> | |
<!-- enable if we want to debug otre/otequinox: | |
<property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" /> | |
--> | |
<!-- debug tests don't like parallelization --> | |
<antcall target="jdt_debug_tests" /> | |
<antcall target="otdt_debug_tests" /> | |
<!--parallel threadCount="2"--> | |
<!-- "slow", ui tests come first --> | |
<antcall target="jdt_ref_tests" /> | |
<antcall target="jdt_ui_tests" /> | |
<antcall target="otdt_ui_tests" /> | |
<antcall target="otdt_ref_tests" /> | |
<antcall target="otdt_dom_tests" /> | |
<antcall target="otdt_tests" /> | |
<antcall target="otequinox_tests" /> | |
<antcall target="otdt_builder_tests" /> | |
<antcall target="jdt_builder_tests" /> | |
<antcall target="jdtcore_compiler_tests" /> | |
<antcall target="jdtcore_model_tests" /> | |
<!-- antcall target="otdt_metrics_tests" / --> | |
<!--/parallel--> | |
</target> | |
<target name="otdt-tests"> | |
<!-- enable if we want to debug otre/otequinox: | |
<property name="extraVMargs" value="-Dot.dump=1 -Dotequinox.debug=OK" /> | |
--> | |
<!-- debug tests don't like parallelization --> | |
<antcall target="otdt_debug_tests" /> | |
<!--parallel threadCount="2"--> | |
<!-- "slow", ui tests come first --> | |
<antcall target="otdt_ui_tests" /> | |
<antcall target="otdt_ref_tests" /> | |
<antcall target="otdt_dom_tests" /> | |
<antcall target="otdt_tests" /> | |
<antcall target="otequinox_tests" /> | |
<antcall target="otdt_builder_tests" /> | |
<antcall target="jdt_builder_tests" /> | |
<antcall target="jdtcore_compiler_tests" /> | |
<antcall target="jdtcore_model_tests" /> | |
<!-- antcall target="otdt_metrics_tests" / --> | |
<!--/parallel--> | |
</target> | |
<target name="onlyone"> | |
<antcall target="otdt_tests" /> | |
</target> | |
</project> |