Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Bullen2018-02-07 19:35:38 +0000
committerSravan Kumar Lakkimsetti2018-02-09 09:44:27 +0000
commitba9efbc62467c1849254395be5add6548fd32a3f (patch)
tree79efe8ccd168d50db620177ad2ca19dbfea089b3 /eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests
parentbff1e0338c45ef05925b5bf948e52b077780b735 (diff)
downloadeclipse.platform.releng.aggregator-ba9efbc62467c1849254395be5add6548fd32a3f.tar.gz
eclipse.platform.releng.aggregator-ba9efbc62467c1849254395be5add6548fd32a3f.tar.xz
eclipse.platform.releng.aggregator-ba9efbc62467c1849254395be5add6548fd32a3f.zip
Bug 530812 - Unify Test.xml used for tests and shipped with test bundles
- Import the scripts from production/testScripts/configuration/sdk.tests/testScripts instead of having them stored in two locations Change-Id: I139c2ce1006d174c5ec94d4db171eb08fec1983a Signed-off-by: Lucas Bullen <lbullen@redhat.com>
Diffstat (limited to 'eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests')
-rw-r--r--eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/assembly/assembly.xml4
-rwxr-xr-xeclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests3
-rwxr-xr-xeclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.bat91
-rwxr-xr-xeclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh212
-rwxr-xr-xeclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtestsmac.sh137
-rwxr-xr-xeclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/startWindowManager.sh62
-rw-r--r--eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml2494
7 files changed, 4 insertions, 2999 deletions
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/assembly/assembly.xml b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/assembly/assembly.xml
index b205c645b..47b4eb9c7 100644
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/assembly/assembly.xml
+++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/assembly/assembly.xml
@@ -6,6 +6,10 @@
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
+ <directory>${project.basedir}/../../production/testScripts/configuration/sdk.tests/testScripts</directory>
+ <outputDirectory>/eclipse-testing</outputDirectory>
+ </fileSet>
+ <fileSet>
<directory>${project.basedir}/src/main/scripts</directory>
<outputDirectory>/eclipse-testing</outputDirectory>
</fileSet>
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests
deleted file mode 100755
index d18879da4..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exec ./runtests.sh "$@" \ No newline at end of file
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.bat b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.bat
deleted file mode 100755
index 936217860..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.bat
+++ /dev/null
@@ -1,91 +0,0 @@
-@echo off
-SETLOCAL
-
-REM default java executable for outer and test vm, in it is case not
-REM passed into this script.
-REM c\:\\Program Files\\Java\\jdk1.8.0_51\\jre\\bin\\java.exe
-set jvm=java
-
-REM reset list of ant targets in test.xml to execute
-set tests=
-
-REM default switch to determine if eclipse should be reinstalled between running of tests
-set installmode=clean
-
-REM property file to pass to Ant scripts
-set properties=
-
-REM default values for os, ws and arch
-set os=win32
-set ws=win32
-set arch=x86
-
-REM reset ant command line args
-set ANT_CMD_LINE_ARGS=
-
-IF EXIST localTestsProperties.bat CALL localTestsProperties.bat
-
-
-REM ****************************************************************
-REM
-REM Install Eclipse if it does not exist
-REM
-REM ****************************************************************
-if NOT EXIST eclipse unzip -qq -o eclipse-SDK-*.zip && unzip -qq -o -C eclipse-junit-tests*.zip plugins/org.eclipse.test* -d eclipse/dropins/
-
-
-:processcmdlineargs
-
-REM ****************************************************************
-REM
-REM Process command line arguments
-REM
-REM ****************************************************************
-
-if x%1==x goto run
-if x%1==x-ws set ws=%2 && shift && shift && goto processcmdlineargs
-if x%1==x-os set os=%2 && shift && shift && goto processcmdlineargs
-if x%1==x-arch set arch=%2 && shift && shift && goto processcmdlineargs
-if x%1==x-noclean set installmode=noclean&& shift && goto processcmdlineargs
-if x%1==x-properties set properties=-propertyfile %2 && shift && shift && goto processcmdlineargs
-if x%1==x-vm set jvm=%2 && shift && shift && goto processcmdlineargs
-if x%1==x-extdirprop SET extdirproperty="-Djava.ext.dirs=%2" && shift && shift && goto processcmdlineargs
-
-
-
-set tests=%tests% %1 && shift && goto processcmdlineargs
-
-echo Specified test targets (if any): %tests%
-echo Specified extdirs (if any): %extdirprop%
-
-:run
-REM ***************************************************************************
-REM Run tests by running Ant in Eclipse on the test.xml script
-REM ***************************************************************************
-REM get name of org.eclipse.equinox.launcher_*.jar with version label
-dir /b eclipse\plugins\org.eclipse.equinox.launcher_*.jar>launcher-jar-name.txt
-set /p launcher-jar=<launcher-jar-name.txt
-
-
-echo "list all environment variables in effect as tests start"
-set
-
-rem -Dtimeout=300000 "%ANT_OPTS%"
-
-IF NOT EXIST %jvm% (
-ECHO ERROR: jvm not defined or does not exist: %jvm%
-exit 1
-)
-
-REM -XshowSettings is supported on windows VMs but ... not every where. So where not supported
-REM causes VM to not start at all. Can be handy for diagnostics. (without running ant <echoproperties/>
-
-IF DEFINED extdirproperty (
-%jvm% %extdirproperty% -Dosgi.os=%os% -Dosgi.ws=%ws% -Dosgi.arch=%arch% -jar eclipse\plugins\%launcher-jar% -data workspace -application org.eclipse.ant.core.antRunner -file test.xml %tests% -Dws=%ws% -Dos=%os% -Darch=%arch% -D%installmode%=true %properties% -logger org.apache.tools.ant.DefaultLogger
-GOTO END
-)
-
-%jvm% -Dosgi.os=%os% -Dosgi.ws=%ws% -Dosgi.arch=%arch% -jar eclipse\plugins\%launcher-jar% -data workspace -application org.eclipse.ant.core.antRunner -file test.xml %tests% -Dws=%ws% -Dos=%os% -Darch=%arch% -D%installmode%=true %properties% -logger org.apache.tools.ant.DefaultLogger
-
-:END
-
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh
deleted file mode 100755
index 6c235f555..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/usr/bin/env bash
-
-# This file is used on production machine, running tests on Hudson, Linux
-# Actually, not currently used on production machine. See
-# following bug for efforts to put "in synch" with production machine
-# version.
-# https://bugs.eclipse.org/bugs/show_bug.cgi?id=437069
-
-echo "command line as passed into $(basename ${0}): ${*}"
-echo "command line (quoted) as passed into $(basename ${0}): ${@}"
-
-# set minimal path to allow consistency.
-# plus, want to have "home"/bin directory, to allow overrides in 'localTestsProperties'
-# for non-production builds.
-export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:~/bin
-
-source localBuildProperties.shsource 2>/dev/null
-
-
-# jvm should already be defined, by now, in production tests
-# export jvm=${jvm:-/shared/common/jdk1.8.0_x64/jre/bin/java}
-# but if not, we use a simple 'java'.
-if [[ -z "${jvm}" ]]
-then
- echo "WARNING: jvm was not defined, so using simple 'java'."
- export jvm=$(which java)
-fi
-
-if [[ -z "${jvm}" || ! -x ${jvm} ]]
-then
- echo "ERROR: No JVM define, or the defined one was found to not be executable"
- exit 1
-fi
-#Extract GTK Version and host name
-
-gtkType=$(echo ${testedPlatform}|cut -d- -f4|cut -d_ -f1)
-gtkVersion=$(rpm -q ${gtkType}|cut -d- -f2)
-
-echo "Jvm : ${jvm}"
-echo "Host : $(hostname)"
-echo "GTK Version: ${gtkVersion}"
-
-# On production, WORKSPACE is the 'hudson' workspace.
-# But, if running standalone, we'll assume "up two" from current directoy
-WORKSPACE=${WORKSPACE:-"../../.."};
-
-stableEclipseInstallLocation=${stableEclipseInstallLocation:-${WORKSPACE}/workarea/${buildId}/eclipse-testing/platformLocation/}
-# Note: test.xml will "reinstall" fresh install of what we are testing,
-# but we do need an install for initial launcher, and, later, need one for a
-# stable version of p2 director. For both purposes, we
-# we should use "old and stable" version,
-# which needs to be installed in ${stableEclipseInstallLocation}.
-# A previous step should have already put the tar or zip file for binary platform there.
-if [[ ! -r ${stableEclipseInstallLocation} ]]
-then
- echo "stableEclipseInstallLocation was NOT found at ${stableEclipseInstallLocation}"
- echo "Exiting, since something is not as expected."
- exit 1
-else
- echo "stableEclipseInstallation directory found, as expected, at ${stableEclipseInstallLocation}"
- # should only be one tar file there, with a name similar to eclipse-platform-4.7.2-linux-gtk-x86_64.tar.gz
- # so for simplicity, we'll assume all is well and untar what ever we find.
- tar -xf ${stableEclipseInstallLocation}/*tar.gz -C ${stableEclipseInstallLocation}
-fi
-
-launcher=$(find ${stableEclipseInstallLocation} -name "org.eclipse.equinox.launcher_*.jar" )
-if [ -z "${launcher}" ]
-then
- echo "ERROR: launcher not found in ${stableEclipseInstallLocation}"
- exit 1
-fi
-echo "launcher: $launcher"
-
-# define, but null out variables we expect on the command line
-
-# operating system, windowing system and architecture variables
-os=
-ws=
-arch=
-
-# list of tests (targets) to execute in test.xml
-tests=
-
-# default value to determine if eclipse should be reinstalled between running of tests
-installmode="clean"
-
-# name of a property file to pass to Ant
-properties=
-
-# ext dir customization. Be sure "blank", if not defined explicitly on command line
-extdirproperty=
-
-# message printed to console
-usage="usage: $0 -os <osType> -ws <windowingSystemType> -arch <architecture> [-noclean] [<test target>][-properties <path>]"
-
-
-# proces command line arguments
-while [ $# -gt 0 ]
-do
- case "${1}" in
- -dir)
- dir="${2}"; shift;;
- -os)
- os="${2}"; shift;;
- -ws)
- ws="${2}"; shift;;
- -arch)
- arch="${2}"; shift;;
- -noclean)
- installmode="noclean";;
- -properties)
- properties="-propertyfile ${2}";shift;;
- -extdirprop)
- extdirproperty="-Djava.ext.dirs=${2}";shift;;
- -vm)
- jvm="${2}"; shift;;
- *)
- tests="$tests\ ${1}";;
- esac
- shift
-done
-
-echo "Specified test targets (if any): ${tests}"
-
-echo "Specified ext dir (if any): ${extdirproperty}"
-
-# for *nix systems, os, ws and arch values must be specified
-if [[ -z "${os}" || -z "${ws}" || -z "${arch}" ]]
-then
- echo >&2 "WARNING: On some systems, os, ws, and arch values must be specified,"
- echo >&2 " but can usually be correctly inferred given the running VM, etc."
- echo >&2 "$usage"
-else
- platformArgString=""
- platformParmString=""
- platformString=""
- if [[ -n "${os}" ]]
- then
- platformArgString="${platformArgString} -Dosgi.os=$os"
- platformParmString="${platformParmString} -Dos=$os"
- platformString="${platformString}${os}"
- fi
- if [[ -n "${ws}" ]]
- then
- platformArgString="${platformArgString} -Dosgi.ws=$ws"
- platformParmString="${platformParmString} -Dws=$ws"
- platformString="${platformString}_${ws}"
- fi
- if [[ -n "${arch}" ]]
- then
- platformArgString="${platformArgString} -Dosgi.arch=$arch"
- platformParmString="${platformParmString} -Darch=$arch"
- platformString="${platformString}_${arch}"
- fi
-fi
-
-
-
-# run tests
-
-#### Uncomment lines below to have complete list of ENV variables.
-#echo " = = = Start list environment variables in effect in runtests.sh = = = ="
-#env
-#echo " = = = End list environment variables in effect in runtests.sh = = = ="
-
-if [[ "true" == "${START_WINDOW_MGT}" ]]
-then
- ./startWindowManager.sh
-fi
-
-# During production tests, we define 'testedPlatform' as a combination of
-# os, ws, arch, and vm level. But for stand alone tests, by default,
-# we will just label simply with what we have. Standalone users can
-# set the value how ever they'd like. The value does not much matter,
-# unless collecting multiple platforms, and processing results, such as
-# build tools indexer.
-#
-if [[ -z "${testedPlatform}" ]]
-then
- if [[ -n "${platformString}" ]]
- then
- export consolelogs=results/consolelogs/${platformString}_consolelog.txt
- export testedPlatform=${platformString}
- else
- # intentionally use 'testedPlatform' as value, if testedPlatform not defined.
- export testedPlatform="testedPlatform"
- export consolelogs=results/consolelogs/${testedPlatform}_consolelog.txt
- fi
-else
- export consolelogs=results/consolelogs/${testedPlatform}_consolelog.txt
-fi
-
-mkdir -p results/consolelogs
-echo "extdirprop in runtest.sh: ${extdirprop}"
-echo "extdirproperty in runtest.sh: ${extdirproperty}"
-echo "ANT_OPTS in runtests.sh: ${ANT_OPTS}"
-echo "platformArgString: ${platformArgString}"
-echo "platformParmString: ${platformParmString}"
-echo "platformString: ${platformString}"
-echo "testedPlatform: ${testedPlatform}"
-
-# -Dtimeout=300000 "${ANT_OPTS}"
-if [[ -n "${extdirproperty}" ]]
-then
- echo "running with extdir defined"
- $jvm ${ANT_OPTS} "${extdirproperty}" ${platformArgString} -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml ${ANT_OPTS} ${platformParmString} -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger $tests 2>&1 | tee $consolelogs
-else
- echo "running without extdir defined"
- $jvm ${ANT_OPTS} ${platformArgString} -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml ${ANT_OPTS} ${platformParmString} -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger $tests 2>&1 | tee $consolelogs
-fi
-
-
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtestsmac.sh b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtestsmac.sh
deleted file mode 100755
index 608cf53c6..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtestsmac.sh
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/usr/bin/env bash
-
-# This file should never exist or be needed for production machine,
-# but allows an easy way for a "local user" to provide this file
-# somewhere on the search path ($HOME/bin is common),
-# and it will be included here, thus can provide "override values"
-# to those defined by defaults for production machine.,
-# such as for jvm
-
-source localBuildProperties.shsource 2>/dev/null
-
-# by default, use the java executable on the path for outer and test jvm
-#jvm=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre/bin/java
-if [[ -z "{jvm}" ]]
-then
- echo "jvm was not defined, so using simple 'java'."
- jvm=java
-fi
-
-echo "jvm: $jvm"
-
-#this value must be set when using rsh to execute this script, otherwise the script will execute from the user's home directory
-dir=.
-
-# operating system, windowing system and architecture variables
-os=
-ws=
-arch=
-
-# list of tests (targets) to execute in test.xml
-tests=
-
-# default value to determine if eclipse should be reinstalled between running of tests
-installmode="clean"
-
-# name of a property file to pass to Ant
-properties=
-
-# ext dir customization. Be sure "blank", if not defined explicitly on command line
-extdirproperty=
-
-# message printed to console
-usage="usage: $0 -os <osType> -ws <windowingSystemType> -arch <architecture> [-noclean] [<test target>][-properties <path>]"
-
-
-# proces command line arguments
-while [ $# -gt 0 ]
-do
- case "${1}" in
- -dir)
- dir="${2}"; shift;;
- -os)
- os="${2}"; shift;;
- -ws)
- ws="${2}"; shift;;
- -arch)
- arch="${2}"; shift;;
- -noclean)
- installmode="noclean";;
- -properties)
- properties="-propertyfile ${2}";shift;;
- -extdirprop)
- extdirproperty="-Djava.ext.dirs=${2}";shift;;
- -vm)
- jvm="${2}"; shift;;
- *)
- tests=$tests\ ${1};;
- esac
- shift
-done
-
-echo "Specified test targets (if any): ${tests}"
-
-echo "Specified ext dir (if any): ${extdirproperty}"
-
-# for *nix systems, os, ws and arch values must be specified
-if [ "x$os" = "x" ]
-then
- echo >&2 "$usage"
- exit 1
-fi
-
-if [ "x$ws" = "x" ]
-then
- echo >&2 "$usage"
- exit 1
-fi
-
-if [ "x$arch" = "x" ]
-then
- echo >&2 "$usage"
- exit 1
-fi
-
-#necessary when invoking this script through rsh
-cd $dir
-
-# TODO: should have a variable (or, computation!) to decide if 'eclipse',
-# or 'Eclipse.app'
-
-ECLIPSE_HOME=Eclipse.app/Contents/Eclipse
-#ECLIPSE_HOME=eclipse
-
-
-if [[ ! -r "${ECLIPSE_HOME}" ]]
-then
- tar -xzf eclipse-SDK-*.tar.gz
- # note, the file pattern to match, must not start with */plugins because there is no leading '/' in the zip file, since they are repos.
- unzip -qq -o -C eclipse-junit-tests-*.zip plugins/org.eclipse.test* -d "${ECLIPSE_HOME}/dropins"
-fi
-
-# run tests
-launcher=`ls ${ECLIPSE_HOME}/plugins/org.eclipse.equinox.launcher_*.jar`
-
-if [[ ! -e "${launcher}" ]]
-then
- echo -e "[ERROR] Failed to find org.eclipse.equinox.launcher_\*jar in ${ECLIPSE_HOME}/plugins"
-fi
-
-# it has been recommended not to "probe and publish" information about systems
-# for slight improvement in security. Bug 387747
-# so I have commented out most such probes, so they won't be routine.
-
-#echo "list all environment variables in effect as tests start"
-#printenv
-
-echo "properties: $properties"
-
-# -Dtimeout=300000 "${ANT_OPTS}"
-if [[ ! -z "${extdirproperty}" ]]
-then
- $jvm "${extdirproperty}" -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml $tests -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger
-else
- $jvm -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml $tests -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger
-fi
-
-
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/startWindowManager.sh b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/startWindowManager.sh
deleted file mode 100755
index ca86b994c..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/startWindowManager.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-# TODO: consider moving all this to 'testAll.sh'. (If testAll.sh stays around)
-# make sure there is a window manager running. See bug 379026
-# we should not have to, but may be a quirk/bug of hudson setup
-# assuming metacity attaches to "current" display by default (which should have
-# already been set by Hudson). We echo its value here just for extra reference/cross-checks.
-# TODO: this does not work, when doing local build. I think the
-# solution, for both cases, is to start an instance of xvfb? And then should
-# have a "background" flag to run on back ground (and not the active user display)
-# since most uses for "local builds" users would want to see the tests running live.
-# This next section on window mangers is needed if and only if "running in background" or
-# started on another machine, such as Hudson or Cruisecontrol, where it may be running
-# "semi headless", but still needs some window manager running for UI tests.
-echo "Check if any window managers are running (xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm):"
-wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm" | grep -v egrep)
-echo "Window Manager processes: $wmpss"
-echo
-
-# in this case, do not "--replace" any existing ones, for this DISPLAY
-# added bit bucket for errors, in attempt to keep from filling up Hudson log with "warnings", such as hundreds of
-# [exec] Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x800059 (Java - Ecl)
-# [exec] Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
-#
-metacity --display=$DISPLAY --sm-disable 2>/dev/null &
-METACITYRC=$?
-METACITYPID=$!
-
-if [[ $METACITYRC == 0 ]]
-then
- # TODO: we may want to kill the one we started, at end of tests?
- echo $METACITYPID > epmetacity.pid
- echo " metacity (with no --replace) started ok. PID: $METACITYPID"
-else
- echo " metacity (with no --replace) failed. RC: $METACITYRC"
- # This should not interfere with other jobs running on Hudson, the DISPLAY should be "ours".
- metacity --display=$DISPLAY --replace --sm-disable &
- METACITYRC=$?
- METACITYPID=$!
- if [[ $METACITYRC == 0 ]]
- then
- # TODO: we may want to kill the one we started, at end of tests?
- echo $METACITYPID > epmetacity.pid
- echo " metacity (with --replace) started ok. PID: $METACITYPID"
- else
- echo " metacity (with --replace) failed. RC: $METACITYRC"
- echo " giving up. But continuing tests"
- fi
-fi
-
-
-echo
-
-# list out metacity processes so overtime we can see if they accumulate, or if killed automatically
-# when our process exits. If not automatic, should use epmetacity.pid to kill it when we are done.
-echo "Current metacity processes running (check for accumulation):"
-ps -ef | grep "metacity" | grep -v grep
-echo
-
-echo "Triple check if any window managers are running (at least metacity should be!):"
-wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm" | grep -v egrep)
-echo "Window Manager processes: $wmpss"
-echo
-
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml b/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml
deleted file mode 100644
index 5fd6b78cf..000000000
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml
+++ /dev/null
@@ -1,2494 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- name="Automated Eclipse Testing in Production"
- default="all"
- basedir=".">
-
- <!--Directory name of org.eclipse.test plug-in installed in ${eclipse-home} -->
- <target
- name="setup"
- unless="noclean"
- depends="init">
- <condition
- property="setupTarget"
- value="setup-zip">
- <contains
- string="${runtimeArchive}"
- substring=".zip" />
- </condition>
- <condition
- property="setupTarget"
- value="setup-tar.gz">
- <contains
- string="${runtimeArchive}"
- substring=".tar.gz" />
- </condition>
-
- <condition
- property="extraIU"
- value="org.eclipse.releng.tools.feature.group">
- <equals
- arg1="${testPlugin}"
- arg2="org.eclipse.releng.tests" />
- </condition>
-
- <condition
- property="extraIU"
- value="org.eclipse.cvs.feature.group">
- <equals
- arg1="${testPlugin}"
- arg2="org.eclipse.pde.build.tests" />
- </condition>
-
- <condition
- property="extraIU"
- value="org.eclipse.equinox.p2.discovery.feature.feature.group">
- <equals
- arg1="${testPlugin}"
- arg2="org.eclipse.equinox.p2.tests.discovery" />
- </condition>
-
- <condition
- property="extraIU"
- value="org.eclipse.cvs.feature.group">
- <equals
- arg1="${testPlugin}"
- arg2="org.eclipse.team.tests.cvs.core" />
- </condition>
-
- <condition
- property="extraIU"
- value="org.eclipse.cvs.feature.group">
- <equals
- arg1="${testPlugin}"
- arg2="org.eclipse.team.tests.core" />
- </condition>
-
- <antcall target="setupRepo" />
- <antcall target="${setupTarget}" />
-
- <antcall target="installPreferences">
- <param
- name="eclipse-home"
- value="${eclipse-home}/eclipse" />
- </antcall>
- <antcall target="installExtraPlugins" />
- <antcall target="installTestPlugins" />
-
- </target>
-
- <target
- name="installPreferences"
- depends="initStreamSpecificProperties">
- <property
- name="preferenceDirectory"
- value="${eclipse-home}/configuration/.settings/" />
- <mkdir dir="${preferenceDirectory}" />
- <echo message="[PREFS] made preferenceDirectory at ${preferenceDirectory}" />
- <antcall target="installNetworkPreferences" />
-
- </target>
-
-
- <target
- name="installNetworkPreferences"
- if="org.eclipse.core.net.prefs">
- <echo
- message="${org.eclipse.core.net.prefs}"
- file="${preferenceDirectory}/org.eclipse.core.net.prefs" />
- <!-- TODO: be sure to check if quoted properly -->
- <echo message="[PREFS] wrote ${org.eclipse.core.net.prefs} to ${preferenceDirectory}" />
- </target>
-
- <!--Extract test bundles repo -->
- <target
- name="setupRepo"
- depends="init"
- unless="testRepoCreated">
- <mkdir dir="${repoLocation}" />
- <exec
- dir="${basedir}"
- executable="unzip"
- failonerror="false"
- resultproperty="unzipResultCode">
- <arg value="-o" />
- <arg value="-qq" />
- <arg value="${repoZip}" />
- <arg value="-d" />
- <arg value="${repoLocation}" />
- </exec>
- <echo message="unzip resultcode: ${unzipResultCode}" />
- <!-- TODO: can do more checking here, if successful, before we set to value -->
- <property
- name="testRepoCreated"
- value="true" />
- </target>
-
- <!--setup for zip archives -->
- <target
- name="setup-zip"
- depends="init"
- description="Reinstall the test Eclipse installation if specified by user">
- <condition property="runtimeArchiveExists">
- <available file="${executionDir}/${runtimeArchive}" />
- </condition>
- <fail
- unless="runtimeArchiveExists"
- message="runtime archive (SDK) did not exist where expected. runtimeArchive: ${executionDir}/${runtimeArchive}" />
- <echo message="Deleting existing ${eclipse-home}, if any." />
- <delete
- dir="${eclipse-home}"
- verbose="false" />
- <echo message="Fresh extract ${runtimeArchive} into ${install} for testing." />
- <exec
- dir="${install}"
- executable="unzip">
- <arg value="-q" />
- <arg path="${executionDir}/${runtimeArchive}" />
- <arg value="-d" />
- <arg path="${install}" />
- </exec>
-
- </target>
-
- <!--setup for tar.gz archives -->
- <target
- name="setup-tar.gz"
- depends="init"
- description="Reinstall the test Eclipse installation if specified by user">
- <condition property="runtimeArchiveExists">
- <available file="${executionDir}/${runtimeArchive}" />
- </condition>
- <fail
- unless="runtimeArchiveExists"
- message="runtime archive (SDK) did not exist where expected. runtimeArchive: ${executionDir}/${runtimeArchive}" />
- <echo message="Deleting existing ${eclipse-home}, if any." />
- <delete
- dir="${eclipse-home}"
- verbose="false" />
-
- <echo message="Fresh extract ${runtimeArchive} into ${install} for testing." />
- <exec
- dir="${install}"
- executable="tar">
- <arg value="-xf" />
- <arg path="${executionDir}/${runtimeArchive}" />
- <arg value="-C" />
- <arg path="${install}" />
- </exec>
-
- </target>
-
- <!--use an stable version of the director so that instability in the current build doesn't cause all the tests to fail -->
- <target
- name="initPlatformArhiveName"
- unless="platformArchive">
- <echo message="os.arch ${os.arch}" />
-
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-linux-gtk.tar.gz">
- <and>
- <os family="unix" />
- <not>
- <or>
- <or>
- <os arch="x86_64" />
- <os arch="amd64" />
- </or>
- <os family="mac" />
- </or>
- </not>
- </and>
- </condition>
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-macosx-cocoa-x86_64.tar.gz">
- <and>
- <os family="mac" />
- <os family="unix" />
- <or>
- <os arch="x86_64" />
- <os arch="amd64" />
- </or>
- </and>
- </condition>
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-macosx-cocoa.tar.gz">
- <and>
- <os family="mac" />
- <os family="unix" />
- <!-- should not need, as long as x86_64 rules (above) comes first
- <os arch="i386" />
- -->
- </and>
- </condition>
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-win32.zip">
- <and>
- <os family="windows" />
- <os arch="x86" />
- </and>
- </condition>
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-win32-x86_64.zip">
- <and>
- <os family="windows" />
- <or>
- <os arch="x86_64" />
- <os arch="amd64" />
- </or>
- </and>
- </condition>
- <condition
- property="platformArchive"
- value="eclipse-platform-${previousReleaseVersion}-linux-gtk-x86_64.tar.gz">
- <and>
- <os family="unix" />
- <or>
- <os arch="x86_64" />
- <os arch="amd64" />
- </or>
- </and>
- </condition>
-
- <fail
- unless="platformArchive"
- message="platformArchive is not defined. Check that conditions cover os arch ${os.arch}. May be VM dependent.)" />
-
- </target>
- <target name="setupPlatform">
- <condition
- property="platformTarget"
- value="platform-zip">
- <contains
- string="${platformArchive}"
- substring=".zip" />
- </condition>
- <condition
- property="platformTarget"
- value="platform-tar.gz">
- <contains
- string="${platformArchive}"
- substring=".tar.gz" />
- </condition>
- <fail
- unless="platformTarget"
- message="platformTarget is not defined. Check that platformArchive variable and value is defined correctly, such as in equinoxp2tests.properties in the appropriate testConfig" />
- <echo message="platformTarget ${platformTarget} platformArchive ${platformArchive}" />
- <!-- The "platformArchive" is a minimal, stable version of eclipse runtime binary,
- that is used only for its "p2Director" application, to install tests into
- to target test environment. The intent is to make sure that apart of the tests
- works consistently, and does not "break the tests", simply because of some recent
- but in p2Director. (while unlikely, these days ... since that code is not under active
- development ... you never know). We test for both "Eclipse.app" and "eclipse.app"
- since the case of our app might change, and the file system of MacOSX may or may
- not be set to "case sensitive".
- -->
- <condition property="basePlatformInstalled">
- <or>
- <available file="${platformLocation}/eclipse" />
- <available file="${platformLocation}/Eclipse.app" />
- <available file="${platformLocation}/eclipse.app" />
- </or>
- </condition>
- <antcall target="${platformTarget}" />
- <antcall target="installPreferences">
- <param
- name="eclipse-home"
- value="${platformLocation}/eclipse" />
- </antcall>
- </target>
-
-
- <!--setup for platform zip archives -->
- <target
- name="platform-zip"
- unless="basePlatformInstalled"
- depends="init"
- description="Install the base binary platform installation">
- <condition property="platformArchiveExists">
- <available file="${platformLocation}/${platformArchive}" />
- </condition>
- <fail
- unless="platformArchiveExists"
- message="plaform archive did not exist where expected. platformArchive: ${platformLocation}/${platformArchive}" />
- <!-- remove eclipse home directory, to be sure completely fresh -->
- <delete
- verbose="false"
- dir="${platformLocation}/eclipse" />
- <exec
- dir="${platformLocation}"
- executable="unzip">
- <arg value="-q" />
- <arg path="${platformLocation}/${platformArchive}" />
- <arg value="-d" />
- <arg path="${platformLocation}" />
- </exec>
- </target>
-
- <!--setup for platform tar.gz archives -->
- <target
- name="platform-tar.gz"
- unless="basePlatformInstalled"
- depends="init"
- description="Install the base binary platform installation">
- <condition property="platformArchiveExists">
- <available file="${platformLocation}/${platformArchive}" />
- </condition>
- <fail
- unless="platformArchiveExists"
- message="plaform archive did not exist where expected. platformArchive: ${platformLocation}/${platformArchive}" />
-
-
- <delete
- verbose="false"
- dir="${platformLocation}/eclipse" />
- <exec
- dir="${platformLocation}"
- executable="tar">
- <arg value="-xf" />
- <arg path="${platformLocation}/${platformArchive}" />
- <arg value="-C" />
- <arg path="${platformLocation}" />
- </exec>
- </target>
-
- <target
- name="installExtraPlugins"
- depends="init"
- if="extraIU">
-
- <path id="launcher.paths">
- <fileset
- dir="${eclipse-home}"
- includes="plugins/org.eclipse.equinox.launcher_*" />
- </path>
- <property
- name="launcherPath"
- refid="launcher.paths" />
-
-
- <echo>-installExtraIU ${extraIU} +</echo>
- <echo> from current.build.repo: ${current.build.repo} </echo>
- <echo> into eclipse-home: ${eclipse-home} </echo>
- <echo> using launcher: ${launcherPath} </echo>
- <java
- jar="${launcherPath}"
- failonerror="false"
- dir="${eclipse-home}"
- timeout="900000"
- fork="true"
- output="${directorLogs}/director-${extraIU}.log"
- append="true"
- resultproperty="directorcode">
- <arg value="-vm" />
- <arg path="${java.home}/bin/java" />
- <arg value="-application" />
- <arg value="org.eclipse.equinox.p2.director" />
- <arg value="-consoleLog" />
- <arg value="-debug" />
- <arg value="-flavor" />
- <arg value="tooling" />
- <arg value="-installIUs" />
- <arg value="${extraIU}" />
- <arg value="-repository" />
- <arg value="${current.build.repo}" />
- </java>
- </target>
-
- <target
- name="installTestPlugins"
- depends="init">
- <path id="launcher.paths">
- <fileset
- dir="${eclipse-home}"
- includes="plugins/org.eclipse.equinox.launcher_*" />
- </path>
- <property
- name="launcherPath"
- refid="launcher.paths" />
- <antcall target="setupPlatform" />
- <antcall target="installPreferences">
- <param
- name="eclipse-home"
- value="${eclipse-home}" />
- </antcall>
- <echo>-installTestIU ${testPlugin} +</echo>
- <echo> from ${repoLocation} </echo>
- <echo> into ${eclipse-home} </echo>
- <echo> using launcher: ${launcherPath} </echo>
- <java
- jar="${launcherPath}"
- failonerror="false"
- dir="${eclipse-home}"
- timeout="900000"
- fork="true"
- output="${directorLogs}/director-${testPlugin}.log"
- append="true"
- resultproperty="directorcode">
- <arg value="-vm" />
- <arg path="${java.home}/bin/java" />
- <arg value="-application" />
- <arg value="org.eclipse.equinox.p2.director" />
- <arg value="-consoleLog" />
- <arg value="-debug" />
- <arg value="-flavor" />
- <arg value="tooling" />
- <arg value="-installIUs" />
- <arg
- value="${testPlugin},org.eclipse.test,org.eclipse.ant.optional.junit,org.eclipse.test.performance,org.eclipse.test.performance.win32,org.easymock" />
- <arg value="-repository" />
- <arg value="file:${repoLocation}" />
- </java>
- <antcall target="configureTeamTest" />
-
- <antcall target="installderby" />
- </target>
-
- <target
- name="installderby"
- if="derby"
- unless="skipDerby">
- <!-- use p2director, not dropins -->
- <property
- name="perfrepoLocation"
- value="http://build.eclipse.org/eclipse/buildtools" />
- <!-- use 'file://' if problems with proxies
- <property
- name="perfrepoLocation"
- value="file:///shared/eclipse/buildtools/" />
- -->
- <java
- jar="${launcherPath}"
- failonerror="true"
- dir="${eclipse-home}"
- timeout="900000"
- fork="true"
- output="${directorLogs}/director-${derby}.log"
- append="true"
- resultproperty="directorcode">
- <arg value="-vm" />
- <arg path="${java.home}/bin/java" />
- <arg value="-application" />
- <arg value="org.eclipse.equinox.p2.director" />
- <arg value="-consoleLog" />
- <arg value="-debug" />
- <arg value="-flavor" />
- <arg value="tooling" />
- <arg value="-installIUs" />
- <arg value="${derby}" />
- <arg value="-p2.os" />
- <arg value="${os}" />
- <arg value="-p2.ws" />
- <arg value="${ws}" />
- <arg value="-p2.arch" />
- <arg value="${arch}" />
- <arg value="-roaming" />
- <arg value="-profile" />
- <arg value="SDKProfile" />
- <arg value="-repository" />
- <arg value="${perfrepoLocation}" />
- <arg value="-destination" />
- <arg path="${eclipse-home}" />
- <arg value="-bundlepool" />
- <arg path="${eclipse-home}" />
- </java>
-
- </target>
-
- <target
- name="initWorkspace"
- unless="WORKSPACE">
- <property environment="env" />
- <condition
- property="WORKSPACE"
- value="${env.WORKSPACE}"
- else="${basedir}">
- <isset property="env.WORKSPACE" />
- </condition>
- </target>
- <target
- name="initProductionProperties"
- depends="initWorkspace">
- <!--
- during production testing, previous steps persists some properties
- that we would otherwise not have access too. Such as those set on
- Hudson command line.
- -->
- <property file="${WORKSPACE}/production.properties" />
-
- </target>
- <target
- name="initBuildId"
- unless="buildId">
- <!--property file that can contain the buildId, if not otherwise set -->
- <property file="label.properties" />
- <fail
- unless="buildId"
- message="buildId (e.g I20140731-0800) needs to be provided to run the tests" />
- </target>
-
- <target
- name="initBuildType"
- depends="initBuildId"
- unless="buildType">
-
- <fail
- unless="buildId"
- message="buildId value must be provided by caller (such as 'I20120717-0800'" />
- <!--
- this "buildId check" may be overly strict, but best to start off strict for now,
- loosen in future if we start to find/have variety
- -->
- <condition property="buildIdOK">
- <matches
- pattern="^[IMXYNPSRU]\d{8}-\d{4}$"
- string="${buildId}" />
- </condition>
- <fail
- message="buildId variable had unexpected format. Should be of the form [IMXYNPSRU] 8 digits '-' 4 digits, but was ${buildId}"
- unless="buildIdOK" />
-
- <script language="javascript"><![CDATA[
- var buildId = project.getProperty("buildId");
- var pattern = new RegExp(/^([IMXYNPSRU])(\d{8})-(\d{4})$/);
-
- var sArray = pattern.exec(buildId);
- // sArray 0 is "whole match"
- project.setProperty("buildType", sArray[1]);
- ]]>
- </script>
- <fail unless="buildType" />
- </target>
- <target
- name="initCurrentUpdateSite"
- depends="initDownloadHosts, initStreamVariables, initBuildId, initBuildType"
- unless="currentUpdateSite">
- <property
- name="currentUpdateSite"
- value="http://${DOWNLOAD_HOST}/eclipse/updates/${updateSiteSegment}-${buildType}-builds/${buildId}" />
- </target>
- <target
- name="initStreamSpecificProperties"
- depends="initConfigurationDir"
- unless="streamSpecificPropertiesSet">
- <!--
- Note: configurationDir used to be set by runTest2.xml in 'production'
- environment only. We may want to set to basedir, if not already set.
- But, this file, streamSpecific.properties should always be optional.
- TODO: better document what is in that file.
- -->
-
- <property file="${configurationDir}/streamSpecific.properties" />
- <property
- name="streamSpecificPropertiesSet"
- value="true" />
- </target>
-
- <!--
- main purpose of initStreamVariables, it to be sure we have eclipseStreamMajor
- and eclipseStreamMinor. Uses Javascript, which requires Java 1.6 (or ... else gets complicated to
- setup)
- -->
- <target
- name="initStreamVariables"
- depends="initDownloadHosts,initConfigurationDir,initStreamSpecificProperties">
-
- <property file="${configurationDir}/streamSpecific.properties" />
- <fail
- unless="eclipseStream"
- message="eclipseStream value must be provided by caller, such as '4.3.0'." />
- <!--
- Not clear why, but I've seen "eclipseStream" value have a trailing
- ?blank? that gets picked up when read in as string.
- Seems it might be a couple of ant issues?
- Luckily we never use it as a whole string (just major and minor)
- so we can ignore spaces.
- -->
- <condition property="streamOK">
- <matches
- pattern="^\s*\d\.\d(\.\d)?\s*$"
- string="${eclipseStream}" />
- </condition>
- <fail
- message="eclipseStream variable had unexpected format. Should be of form digit.digit[.digit], but was ${eclipseStream}"
- unless="streamOK" />
-
- <script language="javascript"><![CDATA[
- var eclipseStream = project.getProperty("eclipseStream");
- var pattern = new RegExp(/^\s*(\d+)\.(\d+)(\.(\d+))?\s*$/);
-
- var sArray = pattern.exec(eclipseStream);
- // sArray[0] is "whole match"
-
- project.setProperty("eclipseStreamMajor", sArray[1]);
- project.setProperty("eclipseStreamMinor", sArray[2]);
- // currently don't
- // set eclipseStreamService since not used,
- // but it is optional in this context, so if needed, need to check
- // length of array and assign "0" if not provided.
- // project.setProperty("eclipseStreamService", sArray[3]);
- ]]>
- </script>
-
- <fail
- unless="eclipseStreamMajor"
- message="eclipseStreamMajor not defined or computable" />
- <fail
- unless="eclipseStreamMinor"
- message="eclipseStreamMinor not defined or computable" />
- <!--
- <fail
- unless="eclipseStreamService"
- message="eclipseStreamService not defined or computable" />
- -->
- </target>
-
- <target
- name="initBasicDirectories"
- depends="initWorkspace,initBuildId, initStreamSpecificProperties,initInstallDir, initEclipseHome"
- unless="basicDirectoriesInitialized">
-
- <property environment="env" />
-
- <property
- name="repoZip"
- value="${executionDir}/eclipse-junit-tests-${buildId}.zip" />
- <echo message="repoZip: ${repoZip}" />
-
- <property
- name="repoLocation"
- value="${executionDir}/testRepo" />
- <echo message="repoLocation: ${repoLocation}" />
-
-
- <property
- name="platformLocation"
- value="${executionDir}/platformLocation" />
- <mkdir dir="${platformLocation}" />
- <echo message="platformLocation: ${platformLocation}" />
-
- <!-- The directory that will contain all files containing information on the tests that ran. -->
- <property
- name="results"
- value="${executionDir}/results" />
- <mkdir dir="${results}" />
- <mkdir dir="${results}/xml" />
- <mkdir dir="${results}/html" />
- <echo message="results: ${results}" />
-
- <!--Directory for JUnit report output, console log output and .log content for each test suite.
- Overrides default in org.eclipse.test/library.xml -->
- <property
- name="junit-report-output"
- value="${results}/${testedPlatform}" />
- <mkdir dir="${junit-report-output}" />
- <echo message="junit-report-output: ${junit-report-output}" />
-
- <property
- name="directorLogs"
- value="${results}/${testedPlatform}/directorLogs" />
- <mkdir dir="${directorLogs}" />
- <echo message="directorLogs: ${directorLogs}" />
-
- <!-- this directory, with some sort files are created during unit tests
- ... need to find where to disable/enable JaCoCo -->
- <property
- name="coverage-output"
- value="${results}/coverageIGNORE" />
-
- <property
- name="basicDirectoriesInitialized"
- value="true" />
- <echo message="basicDirectoriesInitialized" />
- </target>
-
- <!-- this method used only during "unit testing" of this test.xml itself -->
- <target
- name="testCopyFilesIfTesting"
- if="env.TESTING_TEST_XML">
- <echo message="Test of test running on ${osgi.os}" />
- <echo
- message="Reading config from ${WORKSPACE}/eclipse.platform.releng.aggregator/production/testScripts/configuration/sdk.tests/testConfigs/${osgi.os}" />
- <copy todir="${executionDir}">
- <fileset
- dir="${WORKSPACE}/eclipse.platform.releng.aggregator/production/testScripts/configuration/sdk.tests/testConfigs/${osgi.os}" />
- </copy>
- </target>
-
- <target name="initConfigurationDir">
- <property
- name="configurationDir"
- value="${WORKSPACE}/eclipse.platform.releng.aggregator/production/testScripts/configuration" />
- </target>
-
- <target
- name="initInstallDir"
- depends="initBuildId, initStreamSpecificProperties, checkInstallDir"
- unless="install">
- <property
- name="testDir"
- value="${WORKSPACE}/workarea/${buildId}" />
- <echo message="[DEBUG] in test.xml: testDir: ${testDir}" />
-
- <property
- name="executionDir"
- value="${testDir}/eclipse-testing" />
- <mkdir dir="${executionDir}" />
- <echo message="[DEBUG] in test.xml: executionDir: ${executionDir}" />
-
- <!--default directory where test-eclipse-sdk will be installed -->
- <property
- name="install"
- value="${executionDir}/test-eclipse" />
- <mkdir dir="${install}" />
- <echo message="[DEBUG] in test.xml: the value of install was set to: ${install}" />
- </target>
-
- <target
- name="checkInstallDir"
- if="install">
- <echo message="[DEBUG] in test.xml: Found the value of install already set, to ${install}" />
- </target>
-
- <!--
- eclipse-home set to be the folder that will later contain the plugins
- folder.
- Note: we have to set eclipse-home, rather than use "eclpse.home" or "eclipse.home.location"
- because at this point we are executing from the "setup" version of eclipse
- (aka basebuilder)
- not the actual version of eclipse we will later be testing.
- -->
- <target
- name="initEclipseHome"
- depends="initStreamSpecificProperties, initInstallDir, checkEclipseHome"
- unless="eclipse-home">
-
- <condition
- property="eclipse-home"
- value="${install}/Eclipse.app/Contents/Eclipse"
- else="${install}/eclipse">
- <and>
- <os family="mac" />
- <istrue value="${isMacAppLayout}" />
- </and>
- </condition>
- <echo message="[DEBUG] the value of eclipse-home was set to: ${eclipse-home}" />
- </target>
-
- <!--
- Intended to be called only from initEclipseHome, simply as extra information
- for debugging
- -->
- <target
- name="checkEclipseHome"
- if="eclipse-home">
- <echo message="[DEBUG] Found the value of eclipse-home already set, to ${eclipse-home}" />
- </target>
-
- <!--
- DOWNLOAD_HOST and ARCHIVE_HOST can be defined on command line,
- if running on local test environments.
- -->
- <target
- name="initDownloadHosts"
- unless="DOWNLOAD_HOST">
- <!-- we assume if "DOWNLOAD_HOST" is defined, then ARCHIVE_HOST has been defined also. -->
- <property environment="env" />
- <echo message="DEBUG: Found DOWNLOAD_HOST not defined. Setting in 'initDownloadHosts'" />
- <echo message="DEBUG: env.DOWNLOAD_HOST: ${env.DOWNLOAD_HOST}" />
- <condition
- property="DOWNLOAD_HOST"
- value="${env.DOWNLOAD_HOST}"
- else="download.eclipse.org">
- <isset property="env.DOWNLOAD_HOST" />
- </condition>
- <condition
- property="ARCHIVE_HOST"
- value="${env.ARCHIVE_HOST}"
- else="archive.eclipse.org">
- <isset property="env.ARCHIVE_HOST" />
- </condition>
- </target>
-
- <target
- name="init"
- depends="initWorkspace,initProductionProperties,initBuildId, initBuildType, initDownloadHosts, initStreamVariables, initCurrentUpdateSite, initBasicDirectories,initOSes, initPlatformArhiveName, setRuntimeArchive"
- unless="testingIsInitialized">
-
- <property environment="env" />
-
- <!--
- Normally these files are copied by other scripts, if not simply testing this script with "testTestXMLScript.sh",
- but when testing in isolation, want this simple way to
- copy what we need. Note: the testCopyFileIfTesting target
- will need adjustment, depending on OS that the testing is done on.
- -->
- <antcall target="testCopyFilesIfTesting" />
-
- <property
- name="current.build.repo"
- value="http://${DOWNLOAD_HOST}/eclipse/updates/${eclipseStreamMajor}.${eclipseStreamMinor}-${buildType}-builds/${buildId}" />
- <echo message="current.build.repo: ${current.build.repo}" />
-
-
- <property
- name="last.release.build.repo"
- value="http://${DOWNLOAD_HOST}/eclipse/updates/${previousReleaseVersionRepo}" />
- <echo message="last.release.build.repo: ${last.release.build.repo}" />
-
- <!--
- test.properties file contains the plugin name including version number,
- and list of required test plug-ins expressed as command-line argument to unzip executable.
- Generated and packaged at build time by CBI custom Maven task.
- -->
- <property file="test.properties" />
-
-
- <!--Unlock files on the Mac before starting tests.
- Required to delete some workspace directories (org.eclipse.core.filebuffers.tests and Team CVS tests). -->
- <exec
- dir="${executionDir}"
- executable="chflags"
- os="Mac OS X">
- <arg value="-R" />
- <arg value="nouchg" />
- <arg path="${install}" />
- </exec>
-
- <!--
- Originally needed/provided for p2 tests, but they appear not to
- be successful in reading or using these properties any longer.
- Not clear why. So we'll leave it in until understood. (It may be
- useful in other scenarios, such when tested stand alone?)
- -->
- <property
- name="org.eclipse.equinox.p2.reconciler.tests.platform.archive"
- value="${executionDir}/${platformArchive}" />
-
- <property
- name="org.eclipse.equinox.p2.reconciler.tests.platform.archive"
- value="${executionDir}/${platformArchive}" />
- <property
- name="org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive"
- value="NotCurrentlyImplementedOrUsed" />
- <property
- name="org.eclipse.equinox.p2.tests.current.build.repo"
- value="${current.build.repo}" />
- <property
- name="org.eclipse.equinox.p2.tests.last.release.build.repo"
- value="${last.release.build.repo}" />
-
- <!--
- It is likely we do not need the equinoxp2propertiesFile any longer,
- during production tests, at least.
- -->
- <antcall target="rewriteEquinoxp2PropertiesFile" />
-
- <property
- name="testingIsInitialized"
- value="true" />
- </target>
-
- <target name="rewriteEquinoxp2PropertiesFile">
- <property
- name="EOL"
- value="${line.separator}" />
-
- <echo
- message="# properties for p2 tests${EOL}"
- file="${executionDir}/equinoxp2tests.properties"
- append="false"
- force="true" />
-
- <echo
- message="org.eclipse.equinox.p2.reconciler.tests.platform.archive=${org.eclipse.equinox.p2.reconciler.tests.platform.archive}${EOL}"
- file="${executionDir}/equinoxp2tests.properties"
- append="true" />
- <echo
- message="org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive=${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive}${EOL}"
- file="${executionDir}/equinoxp2tests.properties"
- append="true" />
- <echo
- message="org.eclipse.equinox.p2.tests.current.build.repo=${current.build.repo}${EOL}"
- file="${executionDir}/equinoxp2tests.properties"
- append="true" />
- <echo
- message="org.eclipse.equinox.p2.tests.last.release.build.repo=${last.release.build.repo}${EOL}"
- file="${executionDir}/equinoxp2tests.properties"
- append="true" />
- </target>
-
- <!-- runtimeArchive is set to either current, just built SDK, or
- if "baselinePerf" has been set to true, then that baselinePerf version is used,
- such as for performance baselinePerf run. baselinePerf is set in Hudson
- job.
- -->
- <target
- name="setRuntimeArchive"
- unless="runtimeArchive">
- <!-- we'll check "alt" baselinePerf first. This is what's used for "several releases ago", or similar. -->
- <condition
- property="buildIdToUse"
- value="${baselinePerfAltVersionLabel}">
- <istrue value="${baselinePerfAlt}" />
- </condition>
- <condition
- property="buildIdToUse"
- value="${baselinePerfVersionLabel}"
- else="${buildId}">
- <istrue value="${baselinePerf}" />
- </condition>
- <echo message="setRuntimeArchive os ${os} ws ${ws} arch ${arch}" />
- <echo message="build id of runtimeArchive ${buildIdToUse}" />
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-win32.zip">
- <and>
- <equals
- arg1="${os}"
- arg2="win32" />
- <equals
- arg1="${ws}"
- arg2="win32" />
- <equals
- arg1="${arch}"
- arg2="x86" />
- </and>
- </condition>
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-win32-x86_64.zip">
- <and>
- <equals
- arg1="${os}"
- arg2="win32" />
- <equals
- arg1="${ws}"
- arg2="win32" />
- <equals
- arg1="${arch}"
- arg2="x86_64" />
- </and>
- </condition>
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-linux-gtk.tar.gz">
- <and>
- <equals
- arg1="${os}"
- arg2="linux" />
- <equals
- arg1="${ws}"
- arg2="gtk" />
- <equals
- arg1="${arch}"
- arg2="x86" />
- </and>
- </condition>
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-linux-gtk-x86_64.tar.gz">
- <and>
- <equals
- arg1="${os}"
- arg2="linux" />
- <equals
- arg1="${ws}"
- arg2="gtk" />
- <equals
- arg1="${arch}"
- arg2="x86_64" />
- </and>
- </condition>
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-linux-gtk-ppc64.tar.gz">
- <and>
- <equals
- arg1="${os}"
- arg2="linux" />
- <equals
- arg1="${ws}"
- arg2="gtk" />
- <equals
- arg1="${arch}"
- arg2="ppc64" />
- </and>
- </condition>
- <condition
- property="runtimeArchive"
- value="eclipse-SDK-${buildIdToUse}-macosx-cocoa-x86_64.tar.gz">
- <and>
- <equals
- arg1="${os}"
- arg2="macosx" />
- <equals
- arg1="${ws}"
- arg2="cocoa" />
- <equals
- arg1="${arch}"
- arg2="x86_64" />
- </and>
- </condition>
- <echo message="runtimeArchive ${runtimeArchive} !!! " />
- </target>
-
- <target
- name="setJVMProperties"
- depends="setJVMfromUserSpecified"
- unless="jvm">
- <property
- name="VMSource"
- value="VM used for tests, is same that invoked Ant: '${java.home}/bin/java' (that is, 'jvm' not specified by caller)." />
- <echo message="VMSource: $VMSource" />
- <!--
- Remember, we don't want J2SE-X.0 set at all, if there is nothing
- that can run tests that require that level.
- -->
-
- <exec
- executable="${java.home}/bin/java"
- outputproperty="javaversion">
- <arg value="-version" />
- </exec>
- <echo message="full output from 'java -version' of ${java.home}/bin/java is " />
- <echo message="${javaversion}" />
-
- <!--enable tests requiring 1.5 or or greater vms to run if running vm level detected matches required execution environment -->
- <condition
- property="J2SE-5.0"
- value="${java.home}/bin/java">
- <or>
- <matches
- string="${java.version}"
- pattern="^1\.[5678].*$" />
- <matches
- string="${java.version}"
- pattern="^[9].*$" />
- </or>
- </condition>
- <condition
- property="J2SE-6.0"
- value="${java.home}/bin/java">
- <or>
- <matches
- string="${java.version}"
- pattern="^1\.[678].*$" />
- <matches
- string="${java.version}"
- pattern="^[9].*$" />
- </or>
- </condition>
- <condition
- property="J2SE-7.0"
- value="${java.home}/bin/java">
- <or>
- <matches
- string="${java.version}"
- pattern="^1\.[78].*$" />
- <matches
- string="${java.version}"
- pattern="^[9].*$" />
- </or>
- </condition>
- <condition
- property="J2SE-8.0"
- value="${java.home}/bin/java">
- <or>
- <matches
- string="${java.version}"
- pattern="^1\.[8].*$" />
- <matches
- string="${java.version}"
- pattern="^[9].*$" />
- </or>
- </condition>
- <condition
- property="J2SE-9.0"
- value="${java.home}/bin/java">
- <matches
- string="${java.version}"
- pattern="^[9].*$" />
- </condition>
- <echo
- level="info"
- message="DEBUG: values from setJVMProperties" />
- <echo
- level="info"
- message="J2SE-9.0: ${J2SE-9.0}" />
- <echo
- level="info"
- message="J2SE-8.0: ${J2SE-8.0}" />
- <echo
- level="info"
- message="J2SE-7.0: ${J2SE-7.0}" />
- <echo
- level="info"
- message="J2SE-6.0: ${J2SE-6.0}" />
- <echo
- level="info"
- message="J2SE-5.0: ${J2SE-5.0}" />
- </target>
-
- <target
- name="setJVMfromUserSpecified"
- if="jvm">
-
- <property
- name="VMSource"
- value="VM used for tests, specified by caller: 'jvm'=${jvm}" />
- <echo message="VMSource: $VMSource" />
- <!--
- Remember, we don't want J2SE-X.0 set at all, if there is nothing
- that can run tests that require that level.
- -->
- <exec
- executable="${jvm}"
- outputproperty="javaversion">
- <arg value="-version" />
- </exec>
- <echo message="full output from 'java -version' of ${jvm} is " />
- <echo message="${javaversion}" />
-
- <condition
- property="J2SE-9.0"
- value="${jvm}">
- <matches
- string="${javaversion}"
- pattern='^java version "[9].*"' />
- </condition>
- <condition
- property="J2SE-8.0"
- value="${jvm}">
- <or>
- <matches
- string="${javaversion}"
- pattern='^java version "1\.[8].*"' />
- <matches
- string="${javaversion}"
- pattern='^java version "[9].*"' />
- </or>
- </condition>
- <condition
- property="J2SE-7.0"
- value="${jvm}">
- <or>
- <matches
- string="${javaversion}"
- pattern='^java version "1\.[78].*"' />
- <matches
- string="${javaversion}"
- pattern='^java version "[9].*"' />
- </or>
- </condition>
- <condition
- property="J2SE-6.0"
- value="${jvm}">
- <or>
- <matches
- string="${javaversion}"
- pattern='^java version "1\.[678].*"' />
- <matches
- string="${javaversion}"
- pattern='^java version "[9].*"' />
- </or>
- </condition>
- <condition
- property="J2SE-5.0"
- value="${jvm}">
- <or>
- <matches
- string="${javaversion}"
- pattern='^java version "1\.[5678].*"' />
- <matches
- string="${javaversion}"
- pattern='^java version "[9].*"' />
- </or>
- </condition>
- <echo
- level="info"
- message="DEBUG: values from setJVMfromUserSpecified" />
- <echo message="J2SE-9.0: ${J2SE-9.0}" />
- <echo message="J2SE-8.0: ${J2SE-8.0}" />
- <echo message="J2SE-7.0: ${J2SE-7.0}" />
- <echo message="J2SE-6.0: ${J2SE-6.0}" />
- <echo message="J2SE-5.0: ${J2SE-5.0}" />
- </target>
- <target
- name="checkCVSPropExists"
- if="teamcvs">
- <condition property="cvsPropertiesAvailable">
- <available file="${cvstest.properties}" />
- </condition>
- </target>
- <target
- name="getcvstestProperties"
- if="cvsPropertiesAvailable"
- depends="checkCVSPropExists">
- <!--
- TODO: cvstest.properties (file location) is currently
- hard coded in 'runTest2.xml' and passed along this 'test.xml'
- via production.properties. Would be better to have the file location
- be part of the platform specific properties files, as we do with "jvm"
- -->
- <echo message="cvstest.properties file: ${cvstest.properties}" />
- <property file="${cvstest.properties}" />
-
- </target>
- <target
- name="configureTeamTest"
- depends="getcvstestProperties"
- if="teamcvs">
- <!-- Fill in cvs repository information -->
- <replace
- file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
- token="@user@"
- value="${cvs_user}" />
- <replace
- file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
- token="@password@"
- value="${cvs_password}" />
- <replace
- file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
- token="@host@"
- value="${cvs_host}" />
- <replace
- file="${eclipse-home}/plugins/${org.eclipse.team.tests.cvs.core}/repository.properties"
- token="@root@"
- value="${cvs_root}" />
- </target>
-
-
- <macrodef name="runTests">
- <attribute name="testPlugin" />
- <sequential>
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start @{testPlugin}" />
- </antcall>
- <!--always use eclipse executable to launch tests with the exception of performance tests -->
- <!--condition property="useEclipseExe" value="true">
- <not>
- <equals arg1="${test.target}" arg2="performance"/>
- </not>
- </condition -->
-
- <condition
- property="performance.target.present"
- value="true">
- <isset property="@{testPlugin}.has.performance.target" />
- </condition>
-
- <!--override the value of this property with performance if the tests run on performance machine -->
- <property
- name="test.target"
- value="junit" />
- <property
- name="report"
- value="@{testPlugin}" />
-
- <echo message="test.target in 'runTests': ${test.target}" />
-
- <!--install db plug-ins if running performance tests -->
- <condition
- property="derby"
- value="org.apache.derby.core.feature.feature.group">
- <equals
- arg1="${test.target}"
- arg2="performance" />
- </condition>
- <!-- <property name="derby" value="" /> -->
- <!-- <param name="testPlugin" value="${@{testPlugin}}" /> -->
- <antcall target="${test.target}">
- <param
- name="testPlugin"
- value="@{testPlugin}" />
- <param
- name="output-file"
- value="@{testPlugin}.xml" />
- </antcall>
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end @{testPlugin}" />
- </antcall>
- </sequential>
- </macrodef>
-
- <target
- name="junit"
- depends="init"
- unless="skip.test">
- <antcall target="setup">
- </antcall>
- <property file="finalPluginsVersions.properties" />
- <property
- name="library-file"
- value="${executionDir}/library.xml" />
- <property
- name="junit-stylesheet"
- value="${executionDir}/JUNIT.XSL" />
- <echo>trying to find ${testPlugin}_*/test.xml</echo>
- <fileset
- id="test.plugin.file"
- dir="${eclipse-home}/plugins">
- <filename name="${testPlugin}_*/test.xml" />
- </fileset>
- <property
- name="testPluginX"
- refid="test.plugin.file" />
- <echo>trying to find ${testPluginX}</echo>
- <condition
- property="pluginexists"
- value="true">
- <not>
- <equals
- arg1="${testPluginX}"
- arg2="" />
- </not>
- </condition>
- <antcall target="runSuite" />
- <antcall target="genResults" />
- </target>
-
- <target
- name="runSuite"
- if="pluginexists">
- <ant
- antfile="${eclipse-home}/plugins/${testPluginX}"
- dir="${eclipse-home}" />
- </target>
-
-
- <target
- name="runSuitePerf"
- depends="initStreamVariables"
- if="pluginexists">
- <echo message="testPluginX ${testPluginX}" />
- <property
- name="junit-stylesheet"
- value="${executionDir}/JUNIT.XSL" />
- <!--
- TODO: seems these "performance values" should "get into" library.xml in an easier way, that didn't require a change in library.xml.
- TODO: some question on how "fine" to make name. Such as, should "platform, architecture, window system" be "separated" from "VM
- value"?
- TODO: for local, non-production tests, eclipse.perf.dbloc is not being assigned value from "localTestsProperties.shsource" as it
- should. Perhaps needs tweak in Hudson job?
- TODO: would have to compute these in runTest2.xml, to make part of production properties,
- and phpproperties.php
- -->
- <property
- name="eclipse.perf.dbloc"
- value="${eclipse.perf.dbloc.value}" />
- <!-- buildIdToUse equals either baselinePerfVersion or else equals buildId. In either case we want to collect the data -->
- <!-- TODO: Do we need "buildID" coded somewhere, to know WHICH build to match with?
- Or, else will take large number of "baselines" averaged? -->
- <condition
- property="eclipse.perf.config"
- value="build=${baselinePerfAltVersion};config=${testedPlatformConfig};jvm=${javaMajorVersion}">
- <istrue value="${baselinePerfAlt}" />
- </condition>
- <condition
- property="eclipse.perf.config"
- value="build=${baselinePerfVersion};config=${testedPlatformConfig};jvm=${javaMajorVersion}"
- else="build=${buildId};config=${testedPlatformConfig};jvm=${javaMajorVersion}">
- <istrue value="${baselinePerf}" />
- </condition>
- <!--
- This "assert" property works, in this context, because we run baseline first,
- when buildIdToUse != buildId that is a "baseline run" (so, no "assert" for that baseline run).
- But, when buildIdToUse == buildId that is a "normal run" so then we do want to "assert" against the already-collected baseline
- data.
- Note: Note, docs say order does not matter, and could specify "just build" and reset filled in with what's in 'config', but some
- experiences makes me doubt that?
- TODO: design problem: how to distinguish assert against baseline vs. baseline alt.
- -->
- <condition
- property="eclipse.perf.assertAgainst"
- value="build=${baselinePerfVersion}-${buildIdTimestamp};config=${testedPlatformConfig};jvm=${javaMajorVersion};">
- <equals
- arg1="${buildIdToUse}"
- arg2="${buildId}" />
- </condition>
- <!-- frameworkperfargs is used by library.xml ... probably an easier way? -->
- <condition
- property="frameworkperfargs"
- value="-Declipse.perf.dbloc=${eclipse.perf.dbloc} -Declipse.perf.config=${eclipse.perf.config} -Declipse.perf.assertAgainst=${eclipse.perf.assertAgainst}"
- else="-Declipse.perf.dbloc=${eclipse.perf.dbloc} -Declipse.perf.config=${eclipse.perf.config}">
- <isset property="eclipse.perf.assertAgainst" />
- </condition>
-
- <ant
- antfile="${eclipse-home}/plugins/${testPluginX}"
- dir="${eclipse-home}"
- target="performance" />
- </target>
-
- <target
- name="performance"
- if="performance.target.present"
- unless="skip.test"
- depends="init">
- <antcall target="setup" />
- <property file="finalPluginsVersions.properties" />
- <property
- name="library-file"
- value="${executionDir}/library.xml" />
-
- <echo>trying to find ${testPlugin}_*</echo>
- <fileset
- id="test.plugin.file"
- dir="${eclipse-home}/plugins">
- <filename name="${testPlugin}_*/test.xml" />
- </fileset>
- <property
- name="testPluginX"
- refid="test.plugin.file" />
- <echo>trying to find ${testPluginX}</echo>
- <condition
- property="pluginexists"
- value="true">
- <not>
- <equals
- arg1="${testPluginX}"
- arg2="" />
- </not>
- </condition>
- <antcall target="runSuitePerf" />
- <antcall target="genResults" />
- </target>
-
- <target name="genResults">
- <copy
- file="${eclipse-home}/${report}.xml"
- tofile="${results}/xml/${report}_${testedPlatform}.xml"
- failonerror="false" />
- <property
- name="junit-stylesheet"
- value="${executionDir}/JUNIT.XSL" />
- <!-- some "failures" are "bad enough" that the tests were not unpacked, so style sheet won't exist -->
- <available
- file="${junit-stylesheet}"
- property="stylesheetexists" />
- <antcall target="convertToHTML" />
-
- </target>
-
- <target
- name="convertToHTML"
- if="stylesheetexists"
- depends="checkStylesheetexists">
- <xslt
- style="${junit-stylesheet}"
- basedir="${results}/xml"
- destdir="${results}/html"
- filenameparameter="filename">
- <factory>
- <feature name="http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions" value="true"/>
- </factory>
- </xslt>
- </target>
-
- <target
- name="checkStylesheetexists"
- unless="stylesheetexists">
- <echo message="ERROR: previous suite test install failed, so style sheet did not exist" />
- </target>
-
- <target
- name="ant"
- depends="init">
- <runTests testPlugin="org.eclipse.ant.tests.core" />
- </target>
-
- <target
- name="antui"
- depends="init">
- <runTests testPlugin="org.eclipse.ant.tests.ui" />
- </target>
-
- <target
- name="compare"
- depends="init">
- <runTests testPlugin="org.eclipse.compare.tests" />
- </target>
-
- <target
- name="equinoxds"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.ds.tests" />
- </target>
-
- <target
- name="debug"
- depends="init">
- <runTests testPlugin="org.eclipse.debug.tests" />
- </target>
-
- <target
- name="coreresources"
- depends="init">
- <runTests testPlugin="org.eclipse.core.tests.resources" />
- </target>
-
- <target
- name="coreruntime"
- depends="init">
- <runTests testPlugin="org.eclipse.core.tests.runtime" />
- </target>
-
- <target
- name="osgi"
- depends="init">
- <runTests testPlugin="org.eclipse.osgi.tests" />
- </target>
-
- <target
- name="coreexpressions"
- depends="init">
- <runTests testPlugin="org.eclipse.core.expressions.tests" />
- </target>
-
- <target
- name="ltkuirefactoringtests"
- depends="init">
- <runTests testPlugin="org.eclipse.ltk.ui.refactoring.tests" />
- </target>
-
- <target
- name="ltkcorerefactoringtests"
- depends="init">
- <runTests testPlugin="org.eclipse.ltk.core.refactoring.tests" />
- </target>
-
- <target
- name="text"
- depends="init">
- <runTests testPlugin="org.eclipse.text.tests" />
- </target>
-
- <target
- name="jface"
- depends="init">
- <runTests testPlugin="org.eclipse.jface.text.tests" />
- </target>
-
- <target
- name="jfacedatabinding"
- depends="init">
- <runTests testPlugin="org.eclipse.jface.tests.databinding" />
- </target>
-
- <target name="filebuffers">
- <runTests testPlugin="org.eclipse.core.filebuffers.tests" />
- </target>
-
- <target
- name="jdttext"
- unless="skip.jdttext">
- <runTests testPlugin="org.eclipse.jdt.text.tests" />
- </target>
-
- <target
- name="relEng"
- depends="init">
- <runTests testPlugin="org.eclipse.releng.tests" />
- <move
- todir="${results}/chkpii"
- includeEmptyDirs="no"
- failonerror="false">
- <fileset dir="${results}/chkpii" />
- <mapper
- type="glob"
- from="*"
- to="${testedPlatform}_*" />
- </move>
- </target>
-
- <target
- name="ua"
- depends="init">
- <runTests testPlugin="org.eclipse.ua.tests" />
- </target>
-
- <target
- name="uadoc"
- depends="init">
- <runTests testPlugin="org.eclipse.ua.tests.doc" />
- </target>
-
- <target
- name="coretestsnet"
- depends="init">
- <runTests testPlugin="org.eclipse.core.tests.net" />
- </target>
-
- <target
- name="jdtcorecompiler"
- depends="init, setJVMProperties">
- <condition
- property="jvm"
- value="${J2SE-5.0}">
- <isset property="J2SE-5.0" />
- </condition>
- <runTests testPlugin="org.eclipse.jdt.core.tests.compiler" />
- </target>
-
- <target
- name="jdtapt"
- depends="init,setJVMProperties">
- <property
- name="jvm"
- value="${J2SE-5.0}" />
- <!--only run test if J2SE-5.0 property set -->
- <condition property="skip.test">
- <not>
- <isset property="J2SE-5.0" />
- </not>
- </condition>
- <runTests testPlugin="org.eclipse.jdt.apt.tests" />
- </target>
-
- <target
- name="jdtaptpluggable"
- depends="init, setJVMProperties">
- <property
- name="jvm"
- value="${J2SE-6.0}" />
- <!--only run test if J2SE-5.0 property set -->
- <condition property="skip.test">
- <not>
- <or>
- <isset property="J2SE-6.0" />
- <isset property="J2SE-7.0" />
- <isset property="J2SE-8.0" />
- <isset property="J2SE-9.0" />
- </or>
- </not>
- </condition>
- <runTests testPlugin="org.eclipse.jdt.apt.pluggable.tests" />
- </target>
-
-
- <target
- name="jdtcorebuilder"
- depends="init, setJVMProperties">
- <!--Run with 1.5 vm if it is available -->
- <condition
- property="jvm"
- value="${J2SE-5.0}">
- <isset property="J2SE-5.0" />
- </condition>
- <runTests testPlugin="org.eclipse.jdt.core.tests.builder" />
- </target>
-
- <target
- name="jdtcompilertool"
- depends="init, setJVMProperties">
- <property
- name="jvm"
- value="${J2SE-6.0}" />
- <!--only run test if J2SE-6.0 property or greater is set -->
- <condition property="skip.test">
- <not>
- <or>
- <isset property="J2SE-6.0" />
- <isset property="J2SE-7.0" />
- <isset property="J2SE-8.0" />
- <isset property="J2SE-9.0" />
- </or>
- </not>
- </condition>
- <runTests testPlugin="org.eclipse.jdt.compiler.tool.tests" />
- </target>
-
- <target
- name="jdtcompilerapt"
- depends="init, setJVMProperties">
- <property
- name="jvm"
- value="${J2SE-6.0}" />
- <!--only run test if J2SE-6.0 property or greater is set -->
- <condition property="skip.test">
- <not>
- <or>
- <isset property="J2SE-6.0" />
- <isset property="J2SE-7.0" />
- <isset property="J2SE-8.0" />
- <isset property="J2SE-9.0" />
- </or>
- </not>
- </condition>
- <runTests testPlugin="org.eclipse.jdt.compiler.apt.tests" />
- </target>
-
- <target
- name="jdtcoremodel"
- depends="init, setJVMProperties">
- <condition
- property="jvm"
- value="${J2SE-5.0}">
- <isset property="J2SE-5.0" />
- </condition>
- <runTests testPlugin="org.eclipse.jdt.core.tests.model" />
- </target>
-
- <target
- name="jdtcoreperf"
- depends="init">
- <runTests testPlugin="org.eclipse.jdt.core.tests.performance" />
- </target>
-
- <target
- name="jdtdebug"
- depends="init">
- <runTests testPlugin="org.eclipse.jdt.debug.tests" />
- </target>
-
- <target
- name="jdtui"
- depends="init">
- <runTests testPlugin="org.eclipse.jdt.ui.tests" />
- </target>
-
- <target
- name="jdtuirefactoring"
- depends="init">
- <runTests testPlugin="org.eclipse.jdt.ui.tests.refactoring" />
- </target>
-
- <target
- name="pdeui"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.ui.tests" />
- </target>
-
- <target
- name="pdeuitemplates"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.ui.templates.tests" />
- </target>
-
- <target
- name="pdeua"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.ua.tests" />
- </target>
-
- <target
- name="pdegenericeditor"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.genericeditor.extension.tests" />
- </target>
-
- <target
- name="pdebuild"
- depends="init">
- <property
- name="pdebuild"
- value="true" />
- <runTests testPlugin="org.eclipse.pde.build.tests" />
- </target>
-
- <target
- name="swt"
- depends="init">
- <runTests testPlugin="org.eclipse.swt.tests" />
- </target>
-
- <target
- name="teamcore"
- depends="init">
- <runTests testPlugin="org.eclipse.team.tests.core" />
- </target>
-
- <target
- name="teamcvs"
- depends="init">
- <property
- name="teamcvs"
- value="true" />
- <runTests testPlugin="org.eclipse.team.tests.cvs.core" />
- </target>
-
- <target
- name="ui"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests" />
- </target>
-
- <target
- name="uinavigator"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests.navigator" />
- </target>
-
- <target
- name="uircp"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests.rcp" />
- </target>
-
- <target
- name="uiforms"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests.forms" />
- </target>
-
- <target
- name="uieditors"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.editors.tests" />
- </target>
-
- <target
- name="uiperformance"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests.performance" />
- </target>
-
- <target
- name="uiviews"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.tests.views.properties.tabbed" />
- </target>
-
- <target
- name="uiworkbenchtexteditor"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.workbench.texteditor.tests" />
- </target>
-
- <target
- name="genericEditor"
- depends="init">
- <runTests testPlugin="org.eclipse.ui.genericeditor.tests" />
- </target>
-
- <target
- name="update"
- depends="init">
- <runTests testPlugin="org.eclipse.update.tests.core" />
- </target>
-
- <target
- name="pdeapitooling"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.api.tools.tests" />
- </target>
-
- <target
- name="equinoxsecurity"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.security.tests" />
- </target>
-
- <target
- name="equinoxhttpservlet"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.http.servlet.tests" />
- </target>
-
- <target
- name="equinoxp2"
- depends="init">
- <echo
- message="DEBUG: org.eclipse.equinox.p2.reconciler.tests.platform.archive: ${org.eclipse.equinox.p2.reconciler.tests.platform.archive} " />
-
- <runTests testPlugin="org.eclipse.equinox.p2.tests" />
- </target>
-
- <target
- name="equinoxp2ui"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.p2.tests.ui" />
- </target>
-
- <target
- name="equinoxp2discovery"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.p2.tests.discovery" />
- </target>
-
- <target
- name="search"
- depends="init">
- <runTests testPlugin="org.eclipse.search.tests" />
- </target>
-
- <target
- name="pdeds"
- depends="init">
- <runTests testPlugin="org.eclipse.pde.ds.tests" />
- </target>
-
- <target
- name="bidi"
- depends="init">
- <runTests testPlugin="org.eclipse.equinox.bidi.tests" />
- </target>
-
- <target
- name="e4Core"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.core.tests" />
- </target>
-
- <target
- name="e4Commands"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.core.commands.tests" />
- </target>
-
- <target
- name="e4Bindings"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.ui.bindings.tests" />
- </target>
-
- <target
- name="e4CssCore"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.ui.tests.css.core" />
- </target>
-
- <target
- name="e4CssSwt"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.ui.tests.css.swt" />
- </target>
-
- <target
- name="e4UI"
- depends="init">
- <runTests testPlugin="org.eclipse.e4.ui.tests" />
- </target>
-
- <target
- name="all"
- depends="init">
- <!--
- <antcall target="relEng" />
- <antcall target="equinoxp2" />
- -->
- <antcall target="quickTests" />
- <antcall target="longRunningTests" />
-
- </target>
-
- <!-- This and all the performance specific targets
- are temporary, just to help investigate which work, which
- don't, etc. -->
- <target
- name="allPerformance"
- depends="init">
- <!-- There are 41 test suites to claim they have
- performance targets. These "sub groups" are just
- and attempt to help investigate which work, which don't, etc. -->
- <antcall target="selectPerformance" />
- <antcall target="otherPerformance" />
-
-
- </target>
- <!-- This and all the performance specific targets
- are temporary, just to help investigate which work, which
- don't, etc. Visually inspected each, and found these 21 do
- have performance targets, which means there's about 20 that
- have empty performance targets.
- -->
- <target
- name="selectPerformance"
- depends="init">
- <antcall target="antui" />
- <antcall target="compare" />
- <antcall target="coreresources" />
- <antcall target="coreruntime" />
- <antcall target="jdtdebug" />
- <antcall target="jdtui" />
- <!--https://bugs.eclipse.org/bugs/show_bug.cgi?id=443233
- <antcall target="osgi" />
- -->
- <antcall target="pdeui" />
- <antcall target="pdeapitooling" />
- <antcall target="swt" />
- <antcall target="teamcvs" />
- <antcall target="ua" />
- <antcall target="uiforms" />
- <antcall target="uiperformance" />
- <!-- temp remove, we do not run these in unit tests? See bug 380553.
- <antcall target="uircp" />
- -->
-
- </target>
- <target
- name="otherPerformance"
- depends="init">
- <!-- There is no performance tests for org.eclipse.equinox.p2.tests.ui
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=455137
- It has an empty performance target.
- <antcall target="equinoxp2ui" />
- -->
-
- <!-- These three ran but took longer an an hour, some memory issues with one of them? -->
- <antcall target="jdtcoreperf" />
- <antcall target="jdttext" />
- <antcall target="jdtuirefactoring" />
- </target>
- <target
- name="quickTests"
- depends="init">
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start quickTests" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start platform" />
- </antcall>
- <antcall target="platform" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end platform" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start pde" />
- </antcall>
- <antcall target="pde" />
- <antcall target="pdeapitooling" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end pde" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start jdt" />
- </antcall>
- <antcall target="jdt" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end jdt" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end quickTests" />
- </antcall>
-
- </target>
-
- <target
- name="longRunningTests"
- depends="init">
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start longRunningTests" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start platformLR" />
- </antcall>
- <antcall target="platformLR" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end platformLR" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start jdtLR" />
- </antcall>
- <antcall target="jdtLR" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end jdtLR" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="start pdeLR" />
- </antcall>
- <antcall target="pdeLR" />
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end pdeLR" />
- </antcall>
-
- <antcall target="markCurrentTime">
- <param
- name="message"
- value="end longRunningTests" />
- </antcall>
-
- </target>
-
- <!--
- admittedly, not quite all of 'platform', but for
- now serves dual purpose of a "short set" of tests, that area
- relatively quick, and relatively reliable on build.eclipse.org hardware
- -->
- <target
- name="platform"
- depends="init">
- <!-- was removed, temporarily, see bug 400385 -->
- <antcall target="relEng" />
-
- <antcall target="ant" />
- <antcall target="antui" />
- <antcall target="compare" />
- <antcall target="coreruntime" />
- <antcall target="swt" />
- <antcall target="coreexpressions" />
- <antcall target="coretestsnet" />
- <antcall target="text" />
- <antcall target="jfacedatabinding" />
- <antcall target="filebuffers" />
- <antcall target="teamcore" />
- <antcall target="uadoc" />
- <antcall target="uieditors" />
- <antcall target="uinavigator" />
- <antcall target="uiworkbenchtexteditor" />
- <antcall target="genericEditor" />
-
- <antcall target="equinoxhttpservlet" />
- <antcall target="ua" />
- <antcall target="uiforms" />
- <antcall target="equinoxp2ui" />
- <antcall target="equinoxsecurity" />
- <antcall target="search" />
- <antcall target="debug" />
- <antcall target="e4Core" />
- <antcall target="e4Commands" />
- <antcall target="e4Bindings" />
- <antcall target="e4CssCore" />
- <antcall target="e4CssSwt" />
- <antcall target="e4UI" />
- <antcall target="equinoxds" />
- <antcall target="equinoxp2discovery" />
- <antcall target="bidi" />
- <antcall target="ltkuirefactoringtests" />
- <antcall target="ltkcorerefactoringtests" />
-
- </target>
-
- <!-- this group is "platform tests" that are Long Running
- (or, perhaps hang?, during performance tests.
- -->
- <target
- name="platformLR"
- depends="init">
- <antcall target="osgi" />
- <antcall target="coreresources" />
- <antcall target="equinoxp2" />
- <antcall target="teamcvs" />
- <antcall target="jface" />
- <antcall target="ui" />
- <antcall target="uiperformance" />
-
- <!-- don't run now, for 4.2. See bug 380553.
- <antcall target="uircp" />
- -->
- <!-- disable for now, bug 398717
- antcall target="uiviews" /
- -->
- </target>
-
- <target
- name="pde"
- depends="init">
- <antcall target="pdeds" />
- <antcall target="pdeui" />
- <antcall target="pdeua" />
- <antcall target="pdegenericeditor" />
- <antcall target="pdeuitemplates" />
- </target>
-
- <target
- name="pdeLR"
- depends="init">
-
- <antcall target="pdebuild" />
- </target>
-
- <target
- name="jdt"
- depends="init">
- <antcall target="jdtcompilertool" />
- <antcall target="jdtcompilerapt" />
- <antcall target="jdttext" />
- <antcall target="jdtcoreperf" />
- <antcall target="jdtcorebuilder" />
- <antcall target="jdtdebug" />
- <antcall target="jdtapt" />
- <antcall target="jdtaptpluggable" />
- </target>
-
- <target
- name="jdtLR"
- depends="init">
- <antcall target="jdtui" />
- <antcall target="jdtuirefactoring" />
- <antcall target="jdtcoremodel" />
- <antcall target="jdtcorecompiler" />
- </target>
-
- <!-- we could put other variables/os checks here, if needed -->
- <target name="checkOS">
- <condition
- property="isMac"
- value="true">
- <os family="mac" />
- </condition>
- <condition
- property="isUnix"
- value="true">
- <os family="unix" />
- </condition>
- </target>
- <macrodef name="markTime">
- <attribute name="msg" />
- <sequential>
- <!--
- we write the message first, with no ${line.separator} so that the timestamp can
- go on same line, and my side-effect writes an EOL
- -->
- <echo
- message="@{msg} "
- append="true"
- file="${junit-report-output}/testTimes.log" />
- <!-- This executable should run on all unix platforms (Linux, mac) -->
- <exec
- executable="date"
- append="true"
- output="${junit-report-output}/testTimes.log"
- osfamily="unix">
- <arg value="+%s" />
- </exec>
- </sequential>
- </macrodef>
- <target
- name="markCurrentTime"
- depends="checkOS"
- if="isUnix">
- <!-- caller in antcall is expected to supply msg -->
- <property
- name="message"
- value="no message given by caller" />
- <markTime msg="${message}" />
- </target>
-
-
- <!--
- function to centralize how we get (that is, set) the value of
- 'javaMajorVersion'. (expected to be integer, such as 5,6,7,8,9,
- or will be "0" if the version could not be determined, for some reason.
- -->
-
- <target name="getJavaMajorVersion">
- <!--
- TODO: this assumes we are running ant, with same VM as we'll eventually use
- during test. Valid assumption most the time, but ... not necessarily always.
- -->
-
- <script language="javascript">
-
- <!--
- technically does not have to be wrapped in "CDATA" (Ant and BSD define
- it that way, but if not done, other tools (such as XML Editor) can
- break the code by changing the formatting.
- -->
- <![CDATA[
- var javaVersion = project.getProperty("java.version");
- var pattern = new
- RegExp(/^1\.([456789]).*$/);
-
- var sArray = pattern.exec(javaVersion);
- // sArray 0 is "whole match"
- // so will always exist (even
- // if no match?)
- // for safety from programing
- // errors, we'll check that there is
- // something in '1'.
- var length = sArray.length;
- if (length > 1) {
- project.setProperty("javaMajorVersion", sArray[1]);
- } else {
- project.setProperty("javaMajorVersion", "0");
- }
- ]]>
- </script>
- </target>
-
- <macrodef name="printProperty">
- <attribute name="property" />
- <sequential>
- <echo message="@{property}: ${@{property}}" />
- </sequential>
- </macrodef>
-
-
- <target name="debug-allJavaProperties">
- <echoproperties regex="^java\..*$" />
- </target>
- <target name="debug-allOSProperties">
- <echoproperties regex="^os\..*$" />
- </target>
-
- <!--
- initOSes is to make sure the values of os, ws, and arch are set.
- We need them to match their "osgi.X" counterparts, so users often will
- need to simply set the "osgi.X" values as system variables, since
- our ability to guess varies from OS to OS and VM to VM ... but, if
- the osgi.X values are not set, we'll take a guess based on common systems.
- -->
- <target name="initOSes">
-
- <condition
- property="guessed.os"
- value="win32">
- <os family="windows" />
- </condition>
- <condition
- property="guessed.os"
- value="macosx">
- <os family="mac" />
- </condition>
- <condition
- property="guessed.os"
- value="linux">
- <or>
- <os family="unix" />
- </or>
- </condition>
- <!-- if not set above, set to a ridiculous value, that will at least give hint of action to take once it causes a failure -->
- <property
- name="guessed.os"
- value="Value of 'os' could not be determined. 'os' must be set as system variable." />
-
- <condition
- property="os"
- value="${os}"
- else="${guessed.os}">
- <isset property="os" />
- </condition>
-
- <!-- luckily, these days, not multiple windowing systems, for common OSes -->
- <condition
- property="guessed.ws"
- value="win32">
- <os family="windows" />
- </condition>
- <condition
- property="guessed.ws"
- value="cocoa">
- <os family="mac" />
- </condition>
- <condition
- property="guessed.ws"
- value="gtk">
- <os family="unix" />
- </condition>
- <!-- if not set above, set to a ridiculous value, that will at least give hint of action to take once it causes a failure -->
- <property
- name="guessed.ws"
- value="Value of 'ws' could not be determined. 'ws' must be set as system variable." />
-
- <condition
- property="ws"
- value="${ws}"
- else="${guessed.ws}">
- <isset property="ws" />
- </condition>
-
- <!-- not sure this will work well? -->
- <condition
- property="guessed.arch"
- value="x86_64">
- <or>
- <os arch="x86_64" />
- <os arch="amd64" />
- </or>
- </condition>
- <condition
- property="guessed.arch"
- value="x86">
- <or>
- <os arch="x86" />
- <os arch="i386" />
- <os arch="i586" />
- </or>
- </condition>
- <!-- if not set above, set to a ridiculous value, that will at least give hint of action to take once it causes a failure -->
- <property
- name="guessed.ws"
- value="Value of 'arch' could not be determined. 'arch' must be set as system variable." />
-
- <condition
- property="arch"
- value="${arch}"
- else="${guessed.arch}">
- <isset property="arch" />
- </condition>
-
- </target>
-
- <target
- name="test-getJavaMajorVersion"
- depends="debug-allJavaProperties,debug-allOSProperties,getJavaMajorVersion">
- <printProperty property="javaMajorVersion" />
- <printProperty property="java.version" />
- <printProperty property="java.runtime.version" />
- <printProperty property="java.vm.info" />
- <printProperty property="java.specification.version" />
- <printProperty property="java.vendor" />
- <printProperty property="ant.version" />
- <printProperty property="ant.java.version" />
- <!-- <antcall target="printMainProperties" /> -->
- </target>
-
- <target
- name="test-initOSes"
- depends="debug-allProperties,initOSes">
- <printProperty property="os" />
- <printProperty property="ws" />
- <printProperty property="arch" />
- </target>
-
- <target
- name="test-all"
- depends="init,test-initOSes,test-getJavaMajorVersion">
- </target>
-
- <target
- name="debug-allProperties"
- depends="init">
- <echoproperties />
- </target>
-</project>

Back to the top