diff options
author | Mickael Istria | 2022-02-04 09:48:58 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2022-02-07 07:57:03 +0000 |
commit | 64cb3ea441f87668919b014a3eb83c1bf06316a1 (patch) | |
tree | f4635d2d43c9456c64cbc0c647bd2f98de05e728 /production | |
parent | e328d42bb193db7599a7d602ed25ea7d06988847 (diff) | |
download | eclipse.platform.releng.aggregator-master.tar.gz eclipse.platform.releng.aggregator-master.tar.xz eclipse.platform.releng.aggregator-master.zip |
Change-Id: Ieabcff896049efb9288a92c9250ffa71c5f98a13
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/190436
Reviewed-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Tested-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'production')
28 files changed, 0 insertions, 6456 deletions
diff --git a/production/testScripts/buildParams.shsource b/production/testScripts/buildParams.shsource deleted file mode 100644 index e2ac7e73f..000000000 --- a/production/testScripts/buildParams.shsource +++ /dev/null @@ -1,2 +0,0 @@ -buildId=M20120705-1200 -eclipseStream=4.2.1 diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linux/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/linux/platformSpecific.properties deleted file mode 100644 index e88293694..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linux/platformSpecific.properties +++ /dev/null @@ -1,40 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=linux.gtk.x86_64_8.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=/shared/common/jdk1.8.0_x64-latest/jre/bin/java - -# TODO: can also list VMs to use for specific execution environments - -# executable for ant <exec task -testExecutable=bash - -#name of script to execute -testScript=./testAll.sh - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n\ -proxiesEnabled=true\n\ -systemProxiesEnabled=true\n\ -nonProxiedHosts=*.eclipse.org|172.30.206.*|172.25.25.*\n\ -proxyData/HTTP/hasAuth=false\n\ -proxyData/HTTP/host=proxy.eclipse.org\n\ -proxyData/HTTP/port=9898\n\ -proxyData/HTTPS/hasAuth=false\n\ -proxyData/HTTPS/host=proxy.eclipse.org\n\ -proxyData/HTTPS/port=9898\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linux/testAll.sh b/production/testScripts/configuration/sdk.tests/testConfigs/linux/testAll.sh deleted file mode 100755 index 00f47e712..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linux/testAll.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -echo "command line as passed into $(basename ${0}): ${*}" -echo "command line (quoted) as passed into $(basename ${0}): ${@}" - -# This file, localBuildProperties.shsource, 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 - -if [[ -z "${propertyFile}" ]] -then - echo "expect property file as environment variable for production runs" - exit 1 -fi - -if [[ -z "${jvm}" ]] -then - echo "expect jvm as environment variable for production runs" - exit 1 -fi -if [[ -z "${testedPlatform}" ]] -then - echo "expect testedPlatform as environment variable for production runs" - exit 1 -fi - -echo "PWD: $PWD" -# in production tests, should already be set by runTests2.xml, so -# we set to an old version here, to make obvious if not. -export jvm=${jvm:-/shared/common/jdk-1.6.x86_64/jre/bin/java} - -# production machine is x86_64, but some local setups may be 32 bit and will need to provide -# this value in localBuildProperties.shsource. ( -eclipseArch=${eclipseArch:-x86_64} - -# production.properties is used in production tests, -# need to override on local setups to specify appropriate vm (usually same as jvm). -# see bug 388269 -export propertyFile=${propertyFile:-platformSpecific.properties} - -# in product tests, should be set by runTests2.xml, -# so we use "vm value", "x.0" at end, to make obvious if that's not working. -export testedPlatform=${testedPlatform:-linux.gtk.x86_64_x.0} - -echo "=== properties in testAll.sh" -echo " DOWNLOAD_HOST: ${DOWNLOAD_HOST}" -echo " jvm in testAll: ${jvm}" -echo " extdir in testAll (if any): ${extdir}" -echo " propertyFile in testAll: ${propertyFile}" -echo " buildId in testAll: ${buildId}" -echo " testedPlatform: ${testedPlatform}" -echo " ANT_OPTS: ${ANT_OPTS}" - -#execute command to run tests -/bin/chmod 755 runtests.sh -/bin/mkdir -p results/consolelogs - -if [[ -n "${extdir}" ]] -then - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -extdirprop "${extdir}" -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -else - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -fi - diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/platformSpecific.properties deleted file mode 100644 index 09a2c9f66..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/platformSpecific.properties +++ /dev/null @@ -1,40 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=linux.gtk.x86_64_8.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=/shared/common/java/oracle/jdk-10-ga_x64/bin/java - -# TODO: can also list VMs to use for specific execution environments - -# executable for ant <exec task -testExecutable=bash - -#name of script to execute -testScript=./testAll.sh - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n\ -proxiesEnabled=true\n\ -systemProxiesEnabled=true\n\ -nonProxiedHosts=*.eclipse.org|172.30.206.*|172.25.25.*\n\ -proxyData/HTTP/hasAuth=false\n\ -proxyData/HTTP/host=proxy.eclipse.org\n\ -proxyData/HTTP/port=9898\n\ -proxyData/HTTPS/hasAuth=false\n\ -proxyData/HTTPS/host=proxy.eclipse.org\n\ -proxyData/HTTPS/port=9898\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/testAll.sh b/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/testAll.sh deleted file mode 100644 index 00f47e712..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava11/testAll.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -echo "command line as passed into $(basename ${0}): ${*}" -echo "command line (quoted) as passed into $(basename ${0}): ${@}" - -# This file, localBuildProperties.shsource, 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 - -if [[ -z "${propertyFile}" ]] -then - echo "expect property file as environment variable for production runs" - exit 1 -fi - -if [[ -z "${jvm}" ]] -then - echo "expect jvm as environment variable for production runs" - exit 1 -fi -if [[ -z "${testedPlatform}" ]] -then - echo "expect testedPlatform as environment variable for production runs" - exit 1 -fi - -echo "PWD: $PWD" -# in production tests, should already be set by runTests2.xml, so -# we set to an old version here, to make obvious if not. -export jvm=${jvm:-/shared/common/jdk-1.6.x86_64/jre/bin/java} - -# production machine is x86_64, but some local setups may be 32 bit and will need to provide -# this value in localBuildProperties.shsource. ( -eclipseArch=${eclipseArch:-x86_64} - -# production.properties is used in production tests, -# need to override on local setups to specify appropriate vm (usually same as jvm). -# see bug 388269 -export propertyFile=${propertyFile:-platformSpecific.properties} - -# in product tests, should be set by runTests2.xml, -# so we use "vm value", "x.0" at end, to make obvious if that's not working. -export testedPlatform=${testedPlatform:-linux.gtk.x86_64_x.0} - -echo "=== properties in testAll.sh" -echo " DOWNLOAD_HOST: ${DOWNLOAD_HOST}" -echo " jvm in testAll: ${jvm}" -echo " extdir in testAll (if any): ${extdir}" -echo " propertyFile in testAll: ${propertyFile}" -echo " buildId in testAll: ${buildId}" -echo " testedPlatform: ${testedPlatform}" -echo " ANT_OPTS: ${ANT_OPTS}" - -#execute command to run tests -/bin/chmod 755 runtests.sh -/bin/mkdir -p results/consolelogs - -if [[ -n "${extdir}" ]] -then - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -extdirprop "${extdir}" -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -else - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -fi - diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/platformSpecific.properties deleted file mode 100644 index 09a2c9f66..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/platformSpecific.properties +++ /dev/null @@ -1,40 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=linux.gtk.x86_64_8.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=/shared/common/java/oracle/jdk-10-ga_x64/bin/java - -# TODO: can also list VMs to use for specific execution environments - -# executable for ant <exec task -testExecutable=bash - -#name of script to execute -testScript=./testAll.sh - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n\ -proxiesEnabled=true\n\ -systemProxiesEnabled=true\n\ -nonProxiedHosts=*.eclipse.org|172.30.206.*|172.25.25.*\n\ -proxyData/HTTP/hasAuth=false\n\ -proxyData/HTTP/host=proxy.eclipse.org\n\ -proxyData/HTTP/port=9898\n\ -proxyData/HTTPS/hasAuth=false\n\ -proxyData/HTTPS/host=proxy.eclipse.org\n\ -proxyData/HTTPS/port=9898\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/testAll.sh b/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/testAll.sh deleted file mode 100644 index 9456748bb..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/linuxjava14/testAll.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -echo "command line as passed into $(basename ${0}): ${*}" -echo "command line (quoted) as passed into $(basename ${0}): ${@}" - -# This file, localBuildProperties.shsource, 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 - -if [[ -z "${propertyFile}" ]] -then - echo "expect property file as environment variable for production runs" - exit 1 -fi - -if [[ -z "${jvm}" ]] -then - echo "expect jvm as environment variable for production runs" - exit 1 -fi -if [[ -z "${testedPlatform}" ]] -then - echo "expect testedPlatform as environment variable for production runs" - exit 1 -fi - -echo "PWD: $PWD" -# in production tests, should already be set by runTests2.xml, so -# we set to an old version here, to make obvious if not. -export jvm=${jvm:-/shared/common/java/openjdk/jdk-14_x64-latest/bin/java} - -# production machine is x86_64, but some local setups may be 32 bit and will need to provide -# this value in localBuildProperties.shsource. ( -eclipseArch=${eclipseArch:-x86_64} - -# production.properties is used in production tests, -# need to override on local setups to specify appropriate vm (usually same as jvm). -# see bug 388269 -export propertyFile=${propertyFile:-platformSpecific.properties} - -# in product tests, should be set by runTests2.xml, -# so we use "vm value", "x.0" at end, to make obvious if that's not working. -export testedPlatform=${testedPlatform:-linux.gtk.x86_64_x.0} - -echo "=== properties in testAll.sh" -echo " DOWNLOAD_HOST: ${DOWNLOAD_HOST}" -echo " jvm in testAll: ${jvm}" -echo " extdir in testAll (if any): ${extdir}" -echo " propertyFile in testAll: ${propertyFile}" -echo " buildId in testAll: ${buildId}" -echo " testedPlatform: ${testedPlatform}" -echo " ANT_OPTS: ${ANT_OPTS}" - -#execute command to run tests -/bin/chmod 755 runtests.sh -/bin/mkdir -p results/consolelogs - -if [[ -n "${extdir}" ]] -then - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -extdirprop "${extdir}" -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -else - ./runtests.sh -os linux -ws gtk -arch $eclipseArch -vm "${jvm}" -properties ${propertyFile} "${@}" > results/consolelogs/${testedPlatform}_consolelog.txt -fi - diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/macosx/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/macosx/platformSpecific.properties deleted file mode 100644 index 7f0278018..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/macosx/platformSpecific.properties +++ /dev/null @@ -1,37 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value, testedPlatform, is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=macosx.cocoa.x86_64_7.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/bin/java -#jvm=/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/jre/bin/java -# TODO: can also list VMs to use for specific execution environments - -# https://bugs.eclipse.org/bugs/show_bug.cgi?id=392213 -# If this property is set, the actual location and file name -# is computed at test time, but this is assumed to be the -# VM argument required to specify that location. -loglocationarg=-XX:ErrorFile - -# executable for ant <exec task -testExecutable=bash - -#name of script to execute -testScript=./testAll.sh - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/macosx/testAll.sh b/production/testScripts/configuration/sdk.tests/testConfigs/macosx/testAll.sh deleted file mode 100755 index 1c82e603b..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/macosx/testAll.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -ulimit -c unlimited - -# 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 - -echo "PWD: $PWD" -jvm=${jvm:-/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/bin/java} - -# production machine is x86_64, but some local setups may be 32 bit and will need to provide -# this value in localBuildProperties.shsource. -eclipseArch=${eclipseArch:-x86_64} - -# vm.properties is used by default on production machines, but will -# need to override on local setups to specify appropriate vm (usually same as jvm). -# see bug 388269 -propertyFile=${propertyFile:-vm.properties} - -echo "jvm in testAll: ${jvm}" -echo "extdir in testAll (if any): ${extdir}" -echo "propertyFile in testAll: ${propertyFile}" -echo "contents of propertyFile:" -cat ${propertyFile} - -#execute command to run tests -/bin/chmod 755 runtestsmac.sh -/bin/mkdir -p results/consolelogs - -if [[ -n "${extdir}" ]] -then - ./runtestsmac.sh -os macosx -ws cocoa -arch $eclipseArch -extdirprop "${extdir}" -vm "${jvm}" -properties ${propertyFile} $* > results/consolelogs/${testedPlatform}_consolelog.txt -else - ./runtestsmac.sh -os macosx -ws cocoa -arch $eclipseArch -vm "${jvm}" -properties ${propertyFile} $* > results/consolelogs/${testedPlatform}_consolelog.txt -fi diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/platformSpecific.properties deleted file mode 100644 index 870274909..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/platformSpecific.properties +++ /dev/null @@ -1,41 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=win32.win32.x86_64_8.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=c\:\\Program Files\\Java\\jdk1.8.0_162\\jre\\bin\\java.exe - -# TODO: can also list VMs to use for specific execution environments - -# executable for ant <exec task -testExecutable=cmd - -#name of script to execute - -testScript=testAll.bat - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n\ -proxiesEnabled=true\n\ -systemProxiesEnabled=true\n\ -nonProxiedHosts=*.eclipse.org|172.30.206.*|172.25.25.*\n\ -proxyData/HTTP/hasAuth=false\n\ -proxyData/HTTP/host=proxy.eclipse.org\n\ -proxyData/HTTP/port=9898\n\ -proxyData/HTTPS/hasAuth=false\n\ -proxyData/HTTPS/host=proxy.eclipse.org\n\ -proxyData/HTTPS/port=9898\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/testAll.bat b/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/testAll.bat deleted file mode 100644 index c69b5df6b..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/win7-64/testAll.bat +++ /dev/null @@ -1,38 +0,0 @@ -@echo off -SETLOCAL - -REM localTestsProperties.bat is not used or expected in production builds, -REM but is needed for production performance tests and -REM allows a place for people to have their own machines variables defined -REM there so they do not have to hand edit each time to do a local build. -REM a typical example is that their version/location/vendor of VM is likely to differ, -REM so they could redefine jvm to what's appropriate to their machine and setup. - -IF EXIST localTestsProperties.bat CALL localTestsProperties.bat - - -REM vm.properties is used by default on production machines, but will -REM need to override on local setups and performance tests -IF NOT DEFINED propertyFile SET propertyFile=vm.properties - -REM TODO: not sure it is good to put VM here? Is there a good default here; such as "java"? -REM currently, in practice, we sometimes set in Hudson scripts. -REM https://bugs.eclipse.org/bugs/show_bug.cgi?id=390286 -IF NOT DEFINED jvm SET jvm=c:\Program Files\Java\jdk1.7.0_80\jre\bin\java.exe - -ECHO jvm in testAll.bat: %jvm% -ECHO extdir in testAll.bat (if any): %extdir% -ECHO propertyFile in testAll.bat: %propertyFile% - -mkdir results\consolelogs - -set consolelogs=results\consolelogs\%testedPlatform%_consolelog.txt - -IF DEFINED extdir ( -runtests.bat -extdirprop "%extdir%" -os win32 -ws win32 -arch x86_64 -vm "%jvm%" -properties %propertyFile% %* > %consolelogs% -GOTO END -) - -runtests.bat -os win32 -ws win32 -arch x86_64 -vm "%jvm%" -properties %propertyFile% %* > %consolelogs% - -:END diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/win7/platformSpecific.properties b/production/testScripts/configuration/sdk.tests/testConfigs/win7/platformSpecific.properties deleted file mode 100644 index 5a636f90e..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/win7/platformSpecific.properties +++ /dev/null @@ -1,41 +0,0 @@ - -# This properties file contains items that are specific to the platform being tested, -# Typically includes items dependent on exact OS, architecture, and location of files. -# (Historically, this info used to be contained in several files, such as 'vm.properties', -# testing.properties, etc.) - -# This value is computed by scripts, but there may be need or opportunity -# to denote "extra data" if set here? (But, other changes will be -# needed to be fully functional, since indexer, web pages also depend -# on this value. -# testedPlatform=win32.win32.x86_8.0 - -# This is the VM to use to run the tests, if one prefers -# to use a different one from the one that stared the whole process. -#jvm=c\:\\Program Files\\Java\\jdk1.8.0_162\\jre\\bin\\java.exe - -# TODO: can also list VMs to use for specific execution environments - -# executable for ant <exec task -testExecutable=cmd - -#name of script to execute - -testScript=testAll.bat - -# This value gets written to the "preference file", named org.eclipse.core.net.prefs. -# We implement as a property string, since eventually we may test multiple proxy settings. -# These listed here are for tests running on build.eclipse.org, to access files outside -# eclipse.org infrastructure. -org.eclipse.core.net.prefs=\ -eclipse.preferences.version=1\n\ -org.eclipse.core.net.hasMigrated=true\n\ -proxiesEnabled=true\n\ -systemProxiesEnabled=true\n\ -nonProxiedHosts=*.eclipse.org|172.30.206.*|172.25.25.*\n\ -proxyData/HTTP/hasAuth=false\n\ -proxyData/HTTP/host=proxy.eclipse.org\n\ -proxyData/HTTP/port=9898\n\ -proxyData/HTTPS/hasAuth=false\n\ -proxyData/HTTPS/host=proxy.eclipse.org\n\ -proxyData/HTTPS/port=9898\n diff --git a/production/testScripts/configuration/sdk.tests/testConfigs/win7/testAll.bat b/production/testScripts/configuration/sdk.tests/testConfigs/win7/testAll.bat deleted file mode 100644 index 7445ffba6..000000000 --- a/production/testScripts/configuration/sdk.tests/testConfigs/win7/testAll.bat +++ /dev/null @@ -1,39 +0,0 @@ -@echo off -SETLOCAL - -REM localTestsProperties.bat is not used or expected in production builds, -REM but is needed for production performance tests and -REM allows a place for people to have their own machines variables defined -REM there so they do not have to hand edit each time to do a local build. -REM a typical example is that their version/location/vendor of VM is likely to differ, -REM so they could redefine jvm to what's appropriate to their machine and setup. - -IF EXIST localTestsProperties.bat CALL localTestsProperties.bat - - -REM vm.properties is used by default on production machines, but will -REM need to override on local setups and performance tests -IF NOT DEFINED propertyFile SET propertyFile=vm.properties - - -REM TODO: not sure it is good to put VM here? Is there a good default here; such as "java"? -REM currently, in practice, we sometimes set in Hudson scripts. -REM https://bugs.eclipse.org/bugs/show_bug.cgi?id=390286 -IF NOT DEFINED jvm SET jvm=c:\Program Files\Java\jdk1.7.0_80\jre\bin\java.exe - -ECHO jvm in testAll.bat: %jvm% -ECHO extdir in testAll.bat (if any): %extdir% -ECHO propertyFile in testAll.bat: %propertyFile% - -mkdir results\consolelogs - -set consolelogs=results\consolelogs\%testedPlatform%_consolelog.txt - -IF DEFINED extdir ( -runtests.bat -extdirprop "%extdir%" -os win32 -ws win32 -arch x86 -vm "%jvm%" -properties %propertyFile% %* > %consolelogs% -GOTO END -) - -runtests.bat -os win32 -ws win32 -arch x86 -vm "%jvm%" -properties %propertyFile% %* > %consolelogs% - -:END diff --git a/production/testScripts/configuration/sdk.tests/testScripts/.gitignore b/production/testScripts/configuration/sdk.tests/testScripts/.gitignore deleted file mode 100644 index daeefce9b..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/results -/out.txt -/workarea/ -/featureTemp/ -/deltapack/ -/deltapackmirrorlog.txt diff --git a/production/testScripts/configuration/sdk.tests/testScripts/runtests b/production/testScripts/configuration/sdk.tests/testScripts/runtests deleted file mode 100644 index d18879da4..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/runtests +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec ./runtests.sh "$@"
\ No newline at end of file diff --git a/production/testScripts/configuration/sdk.tests/testScripts/runtests.bat b/production/testScripts/configuration/sdk.tests/testScripts/runtests.bat deleted file mode 100644 index cf4d8b3d7..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/runtests.bat +++ /dev/null @@ -1,90 +0,0 @@ -@echo off -SETLOCAL - -REM default java executable for outer and test vm, in case not -REM passed into this script. -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/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh b/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh deleted file mode 100755 index 5f23f985d..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh +++ /dev/null @@ -1,230 +0,0 @@ -#!/usr/bin/env bash - -# This file is used on production machine, running tests on Hudson, Linux - -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}" - -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.10-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 = = = =" - -# 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 - - -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 "DOWNLOAD_HOST: $DOWNLOAD_HOST" -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/production/testScripts/configuration/sdk.tests/testScripts/runtestsmac.sh b/production/testScripts/configuration/sdk.tests/testScripts/runtestsmac.sh deleted file mode 100755 index ad2ba5518..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/runtestsmac.sh +++ /dev/null @@ -1,142 +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=/shared/common/jdk-1.6.x86_64/jre/bin/java -if [[ -z "{jvm}" ]] -then - echo "jvm was unexpectly undefined, so using '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 - hdiutil attach eclipse-SDK-*.dmg - cp -r /Volumes/Eclipse/Eclipse.app . - hdiutil detach /Volumes/Eclipse - xattr -rc Eclipse.app - - #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/production/testScripts/configuration/sdk.tests/testScripts/test.xml b/production/testScripts/configuration/sdk.tests/testScripts/test.xml deleted file mode 100644 index 8bfff8b86..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/test.xml +++ /dev/null @@ -1,2951 +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="setupTarget" - value="setup-dmg"> - <contains - string="${runtimeArchive}" - substring=".dmg" /> - </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.test.feature.group"> - <equals - arg1="${testPlugin}" - arg2="org.eclipse.pde.build.tests" /> - </condition> - - <condition - property="extraIU" - value="org.eclipse.unittest.ui"> - <equals - arg1="${testPlugin}" - arg2="org.eclipse.ua.tests.doc" /> - </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> - - <!--setup for dmg archives --> - <target - name="setup-dmg" - 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="hdiutil"> - <arg value="attach" /> - <arg path="${executionDir}/${runtimeArchive}" /> - </exec> - <exec - dir="${install}" - executable="cp"> - <arg value="-r" /> - <arg path="/Volumes/Eclipse/Eclipse.app" /> - <arg path="${install}/" /> - </exec> - <exec - dir="${install}" - executable="hdiutil"> - <arg value="detach" /> - <arg path="/Volumes/Eclipse" /> - </exec> - <exec - dir="${install}" - executable="xattr"> - <arg value="-rc" /> - <arg path="${install}/Eclipse.app" /> - </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}-macosx-cocoa-x86_64.dmg"> - <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-aarch64.dmg"> - <and> - <os family="mac" /> - <os family="unix" /> - <or> - <os arch="aarch64" /> - <os arch="arm64" /> - <os arch="arm64e" /> - </or> - </and> - </condition> - <condition - property="platformArchive" - value="eclipse-platform-${previousReleaseVersion}-macosx-cocoa.dmg"> - <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-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> - <condition - property="platformArchive" - value="eclipse-platform-${previousReleaseVersion}-linux-gtk-ppc64le.tar.gz"> - <and> - <os family="unix" /> - <os arch="ppc64le" /> - </and> - </condition> - <condition - property="platformArchive" - value="eclipse-platform-${previousReleaseVersion}-linux-gtk-aarch64.tar.gz"> - <and> - <os family="unix" /> - <os arch="aarch64" /> - </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> - <condition - property="platformTarget" - value="platform-dmg"> - <contains - string="${platformArchive}" - substring=".dmg" /> - </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 may 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> - - <!--setup for dmg archives --> - <target - name="platform-dmg" - 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" /> - <echo message="Fresh extract ${runtimeArchive} into ${install} for testing." /> - <exec - dir="${platformLocation}" - executable="hdiutil"> - <arg value="attach" /> - <arg path="${platformLocation}/${platformArchive}" /> - </exec> - <exec - dir="${platformLocation}" - executable="cp"> - <arg value="-r" /> - <arg path="/Volumes/Eclipse/Eclipse.app" /> - <arg path="${platformLocation}/" /> - </exec> - <exec - dir="${platformLocation}" - executable="hdiutil"> - <arg value="detach" /> - <arg path="/Volumes/Eclipse" /> - </exec> - <exec - dir="${platformLocation}" - executable="xattr"> - <arg value="-rc Eclipse.app" /> - </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" /> - <arg value="-repository" /> - <arg value="file:${repoLocation}" /> - </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" /> - - <loadresource property="buildType"> - <string value="${buildId}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="buildType: ${buildType}"/> - - <loadresource property="buildIdTimestamp"> - <string value="${buildId}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\2\3"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="buildIdTimestamp: ${buildIdTimestamp}"/> - - - <!-- - <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]); - project.setProperty("buildIdTimestamp",sArray[2]+sArray[3]); - ]]> - </script> - --> - <fail unless="buildType" /> - </target> - <target - name="initCurrentUpdateSite" - depends="initDownloadHosts, initStreamVariables, initBuildId, initBuildType" - unless="currentUpdateSite"> - <property - name="currentUpdateSite" - value="https://${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" /> - - <loadresource property="eclipseStreamMajor"> - <string value="${eclipseStream}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/> - - <loadresource property="eclipseStreamMinor"> - <string value="${eclipseStream}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\2"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/> -<!-- - <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" /> - - <condition - property="repoBuildIdToUse" - value="${baselinePerfBuildId}" - else="${buildId}"> - <istrue value="${baselinePerf}" /> - </condition> - <property - name="repoZip" - value="${executionDir}/eclipse-junit-tests-${repoBuildIdToUse}.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}" /> - - <property - name="eclipse.perf.samples.out" - value="${results}/${testedPlatform}-perf-samples.dat" /> - <echo message="eclipse.perf.samples.out: ${eclipse.perf.samples.out}" /> - - <!-- 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="https://${DOWNLOAD_HOST}/eclipse/updates/${eclipseStreamMajor}.${eclipseStreamMinor}-${buildType}-builds/${buildId}" /> - <echo message="current.build.repo: ${current.build.repo}" /> - - - <property - name="last.release.build.repo" - value="https://${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"> - - <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-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-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-ppc64le.tar.gz"> - <and> - <equals - arg1="${os}" - arg2="linux" /> - <equals - arg1="${ws}" - arg2="gtk" /> - <equals - arg1="${arch}" - arg2="ppc64le" /> - </and> - </condition> - <condition - property="runtimeArchive" - value="eclipse-SDK-${buildIdToUse}-linux-gtk-aarch64.tar.gz"> - <and> - <equals - arg1="${os}" - arg2="linux" /> - <equals - arg1="${ws}" - arg2="gtk" /> - <equals - arg1="${arch}" - arg2="aarch64" /> - </and> - </condition> - <condition - property="runtimeArchive" - value="eclipse-SDK-${buildIdToUse}-macosx-cocoa-x86_64.dmg"> - <and> - <equals - arg1="${os}" - arg2="macosx" /> - <equals - arg1="${ws}" - arg2="cocoa" /> - <equals - arg1="${arch}" - arg2="x86_64" /> - </and> - </condition> - <condition - property="runtimeArchive" - value="eclipse-SDK-${buildIdToUse}-macosx-cocoa-aarch64.dmg"> - <and> - <equals - arg1="${os}" - arg2="macosx" /> - <equals - arg1="${ws}" - arg2="cocoa" /> - <equals - arg1="${arch}" - arg2="aarch64" /> - </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].*$" /> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </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].*$" /> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </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].*$" /> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </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].*$" /> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </or> - </condition> - <condition - property="J2SE-9.0" - value="${java.home}/bin/java"> - <or> - <matches - string="${java.version}" - pattern="^[9].*$" /> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </or> - </condition> - <condition - property="J2SE-10.0" - value="${java.home}/bin/java"> - <or> - <matches - string="${java.version}" - pattern="^[10].*$" /> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </or> - </condition> - <condition - property="J2SE-11.0" - value="${java.home}/bin/java"> - <or> - <matches - string="${java.version}" - pattern="^[11].*$" /> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </or> - </condition> - <condition - property="J2SE-12.0" - value="${java.home}/bin/java"> - <or> - <matches - string="${java.version}" - pattern="^[12].*$" /> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </or> - </condition> - <condition - property="J2SE-13.0" - value="${java.home}/bin/java"> - <matches - string="${java.version}" - pattern="^[13].*$" /> - </condition> - <echo - level="info" - message="DEBUG: values from setJVMProperties" /> - <echo - level="info" - message="J2SE-13.0: ${J2SE-13.0}" /> - <echo - level="info" - message="J2SE-12.0: ${J2SE-12.0}" /> - <echo - level="info" - message="J2SE-11.0: ${J2SE-11.0}" /> - <echo - level="info" - message="J2SE-10.0: ${J2SE-10.0}" /> - <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-13.0" - value="${jvm}"> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </condition> - <condition - property="J2SE-12.0" - value="${jvm}"> - <or> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </or> - </condition> - <condition - property="J2SE-11.0" - value="${jvm}"> - <or> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </or> - </condition> - <condition - property="J2SE-10.0" - value="${jvm}"> - <or> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </or> - </condition> - <condition - property="J2SE-9.0" - value="${jvm}"> - <or> - <matches - string="${javaversion}" - pattern='^java version "[9].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </or> - </condition> - <condition - property="J2SE-8.0" - value="${jvm}"> - <or> - <matches - string="${javaversion}" - pattern='^java version "1\.[8].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[9].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </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].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </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].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </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].*"' /> - <matches - string="${javaversion}" - pattern='^java version "[10].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[11].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[12].*"' /> - <matches - string="${javaversion}" - pattern='.*version "[13].*"' /> - </or> - </condition> - <echo - level="info" - message="DEBUG: values from setJVMfromUserSpecified" /> - <echo message="J2SE-13.0: ${J2SE-13.0}" /> - <echo message="J2SE-12.0: ${J2SE-12.0}" /> - <echo message="J2SE-11.0: ${J2SE-11.0}" /> - <echo message="J2SE-10.0: ${J2SE-10.0}" /> - <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> - - <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}" /> - - <!-- <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" /> - <fileset - id="plugin.test" - dir="${eclipse-home}/plugins"> - <filename name="${testPlugin}_*/test.xml" /> - </fileset> - <property - name="plugintest" - refid="plugin.test" /> - <echo>trying to find ${testPlugin}_*/test.xml</echo> - <condition - property="plugintest.present" - value="true"> - <not> - <equals - arg1="${plugintest}" - arg2="" /> - </not> - </condition> - <fileset - id="plugin.jar" - dir="${eclipse-home}/plugins"> - <filename name="${testPlugin}_*.jar" /> - </fileset> - <property - name="pluginjar" - refid="plugin.jar" /> - <echo>trying to find ${testPlugin}_*.jar</echo> - <condition - property="pluginjar.present" - value="true"> - <not> - <equals - arg1="${pluginjar}" - arg2="" /> - </not> - </condition> - <antcall target="extractTestXml" /> - <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="extractTestXml" - if="pluginjar.present" - unless="plugintest.present"> - <echo>extracting jar</echo> - <basename property="plugindirectory" file="${eclipse-home}/plugins/${pluginjar}" suffix=".jar"/> - <unzip src="${eclipse-home}/plugins/${pluginjar}" dest="${eclipse-home}/plugins/${plugindirectory}" overwrite="true"> - <patternset> - <include name="test.xml"/> - </patternset> - </unzip> - </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 - --> - <!-- 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=${baselinePerfVersion}-${buildIdTimestamp};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="-DInternalWriteRawPerformanceData=${eclipse.perf.samples.out} -Declipse.perf.config=${eclipse.perf.config} -Declipse.perf.assertAgainst=${eclipse.perf.assertAgainst}" - else="-DInternalWriteRawPerformanceData=${eclipse.perf.samples.out} -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" /> - - <fileset - id="plugin.test" - dir="${eclipse-home}/plugins"> - <filename name="${testPlugin}_*/test.xml" /> - </fileset> - <property - name="plugintest" - refid="plugin.test" /> - <echo>trying to find ${testPlugin}_*/test.xml</echo> - <condition - property="plugintest.present" - value="true"> - <not> - <equals - arg1="${plugintest}" - arg2="" /> - </not> - </condition> - <fileset - id="plugin.jar" - dir="${eclipse-home}/plugins"> - <filename name="${testPlugin}_*.jar" /> - </fileset> - <property - name="pluginjar" - refid="plugin.jar" /> - <echo>trying to find ${testPlugin}_*.jar</echo> - <condition - property="pluginjar.present" - value="true"> - <not> - <equals - arg1="${pluginjar}" - arg2="" /> - </not> - </condition> - <antcall target="extractTestXml" /> - <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="equinoxcommon" - depends="init"> - <runTests testPlugin="org.eclipse.equinox.common.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="jfacetext" - 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="jface" - depends="init"> - <runTests testPlugin="org.eclipse.jface.tests" /> - </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="pdeua" - depends="init"> - <runTests testPlugin="org.eclipse.pde.ua.tests" /> - </target> - - <target - name="pdeuitemplates" - depends="init"> - <runTests testPlugin="org.eclipse.pde.ui.templates.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="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="urischeme" - depends="init"> - <runTests testPlugin="org.eclipse.tests.urischeme" /> - </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="equinoxpreferences" - depends="init"> - <runTests testPlugin="org.eclipse.equinox.preferences.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="pdejunit" - depends="init"> - <runTests testPlugin="org.eclipse.pde.junit.runtime.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="uipluginchecks" - depends="init"> - <runTests testPlugin="org.eclipse.ui.tests.pluginchecks" /> - </target> - - <target - name="all" - depends="init"> - <!-- - <antcall target="relEng" /> - <antcall target="equinoxp2" /> - --> - <antcall target="quickTests" /> - <antcall target="longRunningTests" /> - - </target> - - <target - name="sdkTests" - depends="init"> - <antcall target="quickTests" /> - <antcall target="sdkLongRunningTests" /> - - </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="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> - - <target - name="sdkLongRunningTests" - depends="init"> - - <antcall target="markCurrentTime"> - <param - name="message" - value="start longRunningTests" /> - </antcall> - - <antcall target="markCurrentTime"> - <param - name="message" - value="start sdkPlatformLR" /> - </antcall> - <antcall target="sdkPlatformLR" /> - <antcall target="markCurrentTime"> - <param - name="message" - value="end sdkPlatformLR" /> - </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="uipluginchecks" /> - <antcall target="genericEditor" /> - <antcall target="urischeme" /> - - <antcall target="equinoxhttpservlet" /> - <antcall target="ua" /> - <antcall target="uiforms" /> - <antcall target="equinoxp2ui" /> - <antcall target="equinoxsecurity" /> - <antcall target="equinoxpreferences" /> - <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="equinoxcommon" /> - <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="jface" /> - <antcall target="jfacetext" /> - <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="sdkPlatformLR" - depends="init"> - <antcall target="osgi" /> - <antcall target="coreresources" /> - <antcall target="equinoxp2" /> - <antcall target="jface" /> - <antcall target="ui" /> - <antcall target="uiperformance" /> - </target> - - - <target - name="pde" - depends="init"> - <antcall target="pdeds" /> - <antcall target="pdejunit" /> - <antcall target="pdeui" /> - <antcall target="pdeua" /> - <antcall target="pdeuitemplates" /> - <antcall target="pdegenericeditor" /> - </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"> - <!-- - Since we don't support below java 11 we can safely ignore version numbers for java 8 and below - --> - - <loadresource property="javaMajorVersion"> - <string value="${java.version}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)([\.-](.*))" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="javaMajorVersion: ${javaMajorVersion}"/> - - <!-- - <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> - <!-- 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> diff --git a/production/testScripts/configuration/sdk.tests/testScripts/testTestXMLScript.sh b/production/testScripts/configuration/sdk.tests/testScripts/testTestXMLScript.sh deleted file mode 100755 index 7c3cb6750..000000000 --- a/production/testScripts/configuration/sdk.tests/testScripts/testTestXMLScript.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -source localBuildProperties.shsource 2>/dev/null - -# No longer works as expected. -# TODO: fix. - -# Utility to test the test.xml file. It's intended to allow rapid confirmation -# that the test.xml file ends up "computing" correct values, for various versions -# of java and ant. - -# In particular, ant cant be invoked with one version of java, but another version -# of java used to actually run the tests. - -# Currently the file 'testing.properties' must be copied as peer of test.xml ... simply for -# its absence to not cause an error. - -# Typically, to simulate production builds (tests) on Hudson, a 'vm.properties' tests will -# also be present, where alternative, specific VMs could be specified. (This allows, for example, -# the same Hudson setup to test Java 6, 7, or 8 (no matter what VM the ant task was -# started with. - -# In addition to the console output. which should be captured, with something like -# ./testTextXMLScript.sh | tee testoutput.txt -# some data or set-up files will be created as they normally would if running the real tests. -# The can be checked to be sure they are correct, and in correct (relative) locations. - -# unset some common variables which we don't want (or, set ourselves) -unset JAVA_HOME -unset JAVA_ROOT -unset JAVA_JRE -unset CLASSPATH -unset JAVA_BINDIR -unset JRE_HOME - - -# Different versions of Ant are specified here in test script, just to confirm -# nothing is specific to any recent version of ant. (Though, some of the machines -# have ant 1.6 set as 'default'!) -#export ANT_HOME=/shared/common/apache-ant-1.7.1 -#export ANT_HOME=/shared/common/apache-ant-1.8.4/ -export ANT_HOME=/shared/common/apache-ant-1.9.6 - -# JAVA_HOME is, at least, what runs the ant instance. If no 'jvm' option is specified, -# it also becomes the instance that runs the tests. -JAVA_11_HOME=/opt/public/common/java/openjdk/jdk-11_x64-latest -export JAVA_HOME=${JAVA_HOME:-${JAVA_11_HOME}} -export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:/usr/local/bin:/usr/bin:/bin:${HOME}/bin - -export TESTING_TEST_XML=true - -# There are a number of test-<something> methods in test xml which, by convention, mean -# to simply test the test script itself. The test-all target runs all of those tests. -#ant -f test.xml test-all - -ant -f test.xml test-all -propertyfile vm.properties -DbuildId=I20160430-0237 -DeclipseStream=4.7.0 -Dosgi.os=linux - diff --git a/production/testScripts/configuration/streamSpecific.properties b/production/testScripts/configuration/streamSpecific.properties deleted file mode 100644 index 6b4c0bae6..000000000 --- a/production/testScripts/configuration/streamSpecific.properties +++ /dev/null @@ -1,46 +0,0 @@ -# -# This properties file should contains items that are specific to the stream being tested. -# Note: I don't believe these are currently being used, as intended, but can/will be -# at some point. - -# purely title or identifier for display, to help confirm right file -# is being retrieved and used. -streamSpecificPropertiesTitle="Properties for 4.23.0 builds and tests" - -# These "previousRelease" variables are primarily used to have a -# stable version of Eclipse, that is used, for example, for it's p2 -# director, etc., so that "running the tests" is not actually using -# the "just built" versions. -previousReleaseLocation=https://${DOWNLOAD_HOST}/eclipse/downloads/drops4/R-4.22-202111241800/ -# version here is "build label" ... in general form, the "middle" of archive name, -# such as "eclipse-platform-${previousReleaseVersion}-linux-gtk-x86_64.tar.gz -# Also used used in p2 testing? -previousReleaseVersion=4.22 -# This is last segment of last release repo, such as in -# http://${ARCHIVE_HOST}/eclipse/updates/${previousReleaseVersion} -# NOTE: I am assuming the "composite" repo is suitable for p2. In theory, -# they might want the simple repo, such as at 4.4/R-4.4.1-201409250400 -previousReleaseVersionRepo=4.22 - -# Note: API tests needs the _base_ of previous release, and also the previous service release -# Bug 378587 - update releng tests (data) to go work against previous release -# Bug 380033 - temp fix to hard code 'archive.eclipse.org' for now -apiTestsPreviousBaseDLBaseURL=obsoleteAndNotUsed -apiTestsPreviousBaseWin32Filename=obsoleteAndNotUsed -apiTestsPreviousRefererenceBaseDLBaseURL=obsoleteAndNotUsed -apiTestsPreviousRefererenceWin32Filename=obsoleteAndNotUsed - -# the following are not used in unit tests, only performance tests, when the variables -# baselinePerf=true -# are specified. The baselinePerf will often be the same as "previous release", but -# not necessarily, so is not hard coded in assumptions. -baselinePerfLocation=https://${DOWNLOAD_HOST}/eclipse/downloads/drops4/R-4.22-202111241800 -# NOTE: value must match baselineCode in testScripts/updateTestResultsPages.sh -baselinePerfVersion=R-4.22-202111241800 -# TODO: could/should eventually "compute" label, from full version? -baselinePerfVersionLabel=4.22 -baselinePerfBuildId=I20211124-1800 - -# We currently set here, but would be better to compute this value -# by peeking in the "to be tested" tar file. -isMacAppLayout=true diff --git a/production/testScripts/genTestIndexes.xml b/production/testScripts/genTestIndexes.xml deleted file mode 100644 index a0e257cdf..000000000 --- a/production/testScripts/genTestIndexes.xml +++ /dev/null @@ -1,156 +0,0 @@ -<project - name="Helper targets" - default="generateEclipseIndex" - basedir="."> - - <target - name="init" - depends="initStreamVariables" - unless="genTestIndexesInitialized"> - <fail unless="buildId" /> - <fail unless="eclipseStream" /> - <fail unless="job" /> - - <property - name="isBuildTested" - value="true" /> - - <script language="javascript"> - <![CDATA[ - var buildId = project.getProperty("buildId"); - var pattern = new RegExp(/^([IMXYPNSRU])(\d{8})-(\d{4})$/); - - var sArray = pattern.exec(buildId); - // sArray 0 is "whole match" - project.setProperty("buildType", sArray[1]); - ]]> - </script> - <condition - property="dropsDirSegment" - value="drops4" - else="drops"> - <equals - arg1="${eclipseStreamMajor}" - arg2="4" /> - </condition> - <!-- publish.xml expects buildLabel in places, instead of buildId, - though we use them interchangebly --> - <property - name="buildLabel" - value="${buildId}" /> - - <property - name="buildRoot" - value="${buildHome}/${eclipseStreamMajor}${buildType}" /> - - <property - name="postingDirectory" - value="${buildRoot}/siteDir/eclipse/downloads/${dropsDirSegment}" /> - - <property - name="EBuilderDir" - value="${postingDirectory}/${buildId}/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder" /> - - <!-- This is purely a subset of tychoeclipsebuilder files, copyied at build time, so part of - the results output we are working on, so they will be the same once the tests are done, even if gitCache updated by anohter build, - or a run from previous test results --> - <!-- /data/shared/eclipse/builds/4N/master/gitCache/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles --> - <property - name="publishingContent" - value="${EBuilderDir}/eclipse/publishingFiles" /> - - <echo message="= = Properties in genTestIndexes.xml, init = = " /> - <echo message=" job: ${job}" /> - <echo message=" postingDirectory: ${postingDirectory}" /> - <echo message=" isBuildTested: ${isBuildTested}" /> - - <!-- This is our new, "safe for every test" location --> - <property - name="base.builder" - value="${postingDirectory}/${buildId}/org.eclipse.releng.basebuilder" /> - - <property - name="buildDirectory" - value="${postingDirectory}/${buildId}" /> - - - <property - name="genTestIndexesInitialized" - value="true" /> - - </target> - - <target - name="generateEclipseIndex" - depends="init"> - - <property - name="generatorClass" - value="org.eclipse.releng.generators.TestResultsGenerator" /> - - <echo message=" DEBUG: generatorClass: ${generatorClass}" /> - <available - classname="${generatorClass}" - property="class" - value="${generatorClass}" /> - - <!-- These variables used to be defined here, but now are defined in - publish.xml generateIndex target based on $job - indexFileName - dropTemplateFileName - testManifestFileName - --> - - <antcall target="publishEclipseIndex" /> - - </target> - - <target - name="publishEclipseIndex" - depends="init"> - - - <fail - unless="buildType" - message="buildType should have been defined by now" /> - - <!--regenerate the index page with links to test results --> - <ant - antfile="${EBuilderDir}/eclipse/buildScripts/publish.xml" - dir="${publishingContent}" - target="generateIndex"> - - </ant> - - </target> - - <target name="initStreamVariables"> - - <fail - unless="eclipseStream" - message="eclipseStream must be provided by caller" /> - <condition property="streamOK"> - <matches - pattern="\d+\.\d+\.\d+" - string="${eclipseStream}" /> - </condition> - <fail - message="eclipseStream variable had unexpected format. Should be digit.digit.digit, but was ${eclipseStream}" - unless="streamOK" /> - <script language="javascript"> - <![CDATA[ - var eclipseStream = project.getProperty("eclipseStream"); - var pattern = new - RegExp(/(\d+)\.(\d+)\.(\d+)/); - - var sArray = pattern.exec(eclipseStream); - // sArray[0] is "whole match" - project.setProperty("eclipseStreamMajor", sArray[1]); - project.setProperty("eclipseStreamMinor", sArray[2]); - project.setProperty("eclipseStreamService", sArray[3]); - ]]> - </script> - - </target> - -</project> diff --git a/production/testScripts/hudsonBootstrap/getEBuilder.sh b/production/testScripts/hudsonBootstrap/getEBuilder.sh deleted file mode 100755 index c364d774e..000000000 --- a/production/testScripts/hudsonBootstrap/getEBuilder.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -# Utility script to "bootstrap" Hudson Eclipse Platform Unit tests, to get the -# basic files needed to get all the other required files and start the test framework. - -#EBUILDER_HASH=$1 -#WORKSPACE=$2 - -if [[ -z "${WORKSPACE}" ]] -then - echo "WORKSPACE not supplied, will assume current directory" - WORKSPACE=${PWD} -else - if [[ ! -d "${WORKSPACE}" ]] - then - echo "ERROR: WORKSPACE did not exist. Perhaps you meant its parent?" - exit 1 - fi -fi - -if [[ -z "${EBUILDER_HASH}" ]] -then - echo "EBUILDER HASH, BRANCH, or TAG was not supplied, assuming 'master'" - EBUILDER_HASH=master -fi - -# remove just in case left from previous failed run -rm ebuilder.zip 2>/dev/null -rm -fr tempebuilder 2>/dev/null - - EBUILDER=eclipse.platform.releng.aggregator - TARGETNAME=eclipse.platform.releng.aggregator - ESCRIPT_LOC=${EBUILDER}/production/testScripts - -# TODO: make host variable, so can be sourced, for local test build -wget -O ebuilder.zip --no-verbose https://git.eclipse.org/c/platform/${EBUILDER}.git/snapshot/${EBUILDER}-${EBUILDER_HASH}.zip 2>&1 -unzip -q ebuilder.zip -d tempebuilder -mkdir -p ${WORKSPACE}/$TARGETNAME -rsync --recursive "tempebuilder/${EBUILDER}-${EBUILDER_HASH}/" "${WORKSPACE}/${TARGETNAME}/" -rccode=$? -if [[ $rccode != 0 ]] -then - echo "ERROR: rsync did not complete normally.rccode: $rccode" - exit $rccode -fi - -# remove on clean exit, if they exist -if [[ -f ebuilder.zip ]] -then - rm ebuilder.zip -fi -if [[ -d tempebuilder ]] -then - rm -fr tempebuilder -fi -exit 0 - - diff --git a/production/testScripts/hudsonBootstrap/getEBuilder.xml b/production/testScripts/hudsonBootstrap/getEBuilder.xml deleted file mode 100644 index 892c77737..000000000 --- a/production/testScripts/hudsonBootstrap/getEBuilder.xml +++ /dev/null @@ -1,255 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - A utility ant script get the eclipse builder from Git. - - Hudson jobs can call this script from ant as one of it first build steps. - Such as, start with a wget fetch from CGit (where following $dash; is literally a '-', - it is escaped here just for XML rules against two dashes in a comment); - - wget -O getEBuilder.xml ‐‐no-verbose https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/plain/production/testScripts/hudsonBootstrap/getEBuilder.xml - 2>&1 - - Then use ant to invoke the functionality. Example: - - ant -f getEBuilder.xml -EBUILDER_HASH=910fca82df3ea649ba8ee758259561582e13bf8b - ---> -<project - name="getEBuilder" - default="getEBuilder" - basedir="."> - - - <target - name="init" - depends="initWorkspace" - unless="getEBuilderInitialized"> - - <!-- assign defaults if not on hudson, for local testing if nothing else --> - <property - name="WORKSPACE" - value="${basedir}" /> - - <condition - property="gitHost" - value="${env.GIT_HOST}" - else="git.eclipse.org"> - <isset property="env.GIT_HOST" /> - </condition> - - <!-- normally provided by caller, but if not, assume master --> - <property - name="EBUILDER_HASH" - value="master" /> - - <!-- git is fall back, if no method set explicitly --> - <condition - property="fetchSource" - value="git"> - <and> - <not> - <isset property="EBuilderlocal" /> - </not> - <not> - <isset property="downloadURL" /> - </not> - </and> - </condition> - <property - name="scmProject" - value="eclipse.platform.releng.aggregator" /> - - <property - name="folderName" - value="eclipse.platform.releng.aggregator" /> - - <property - name="eScriptLocation" - value="${folderName}/production/testScripts" /> - - <echo message="=== Properties in 'getEBuilder.xml'" /> - <echo message=" WORKSPACE: ${WORKSPACE}" /> - <echo message=" folderName: ${folderName}" /> - <echo message=" eScriptLocation: ${eScriptLocation}" /> - <echo message=" scmProject: ${scmProject}" /> - <echo message=" EBUILDER_HASH: ${EBUILDER_HASH}" /> - <echo message=" The following are used, in order (if defined), to get 'production scripts'" /> - <echo message=" (fetchDirect from) downloadURL: ${downloadURL}" /> - <echo message=" (copy from local cache directory) EBuilderlocal: ${EBuilderlocal}" /> - <echo message=" fetchSource (from Git): ${fetchSource}" /> - - <property - name="getEBuilderInitialized" - value="true" /> - </target> - - - <target - name="getEBuilder" - depends="init"> - - <!-- remove old one, if there, and make sure directory exists for - eventual checkout/copy/globmapper - --> - <delete dir="${WORKSPACE}/${folderName}" /> - <mkdir dir="${WORKSPACE}/${folderName}" /> - - <antcall target="fetchEBuilder" /> - <antcall target="EBuildercleanup" /> - - <ant antfile="${WORKSPACE}/${eScriptLocation}/runTests2.xml" /> - - </target> - - <target - name="fetchEBuilderFromGit" - depends="init,fetchEBuilderLocal" - unless="EBuilderfetched"> - <echo message="Fetching EBuilder from Git via CGit" /> - <get - src="https://${gitHost}/c/platform/${scmProject}.git/snapshot/${scmProject}-${EBUILDER_HASH}.zip" - dest="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}.zip" - httpusecaches="false" - verbose="true" /> - <unzip - src="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}.zip" - dest="${WORKSPACE}/tempEBuilder/" - overwrite="true" /> - - <echo message="preparing to move ${WORKSPACE}/tempEBuilder" /> - <echo message=" into ${WORKSPACE}/${folderName}" /> - <echo message=" using regexp mapper" /> - <!-- We need only the 'production/testscripts' directory. And input can be of different "depths" depending on where it comes from. --> - <move - verbose="true" - todir="${WORKSPACE}/${folderName}"> - <fileset dir="${WORKSPACE}/tempEBuilder" /> - <mapper - type="regexp" - from=".*production([/\\])testScripts(.*)" - to="production\1testScripts\2" /> - </move> - - <echo message="Fetched EBuilder/production/testscrips to ${WORKSPACE}/${folderName}" /> - <property - name="EBuilderfetched" - value="true" /> - - </target> - - <!-- specify -DnoEBuildercleanup=true on command line, to have zip and folder left in place, - such as for debugging or desired to copy the zip to your local cache. - --> - <target - name="EBuildercleanup" - unless="noEBuildercleanup"> - - <!-- we've moved the files, now to remove the empty dir --> - <delete - dir="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}" - failonerror="false" /> - - <!-- cleanup (may eventually want to "cache" this zip file, so no need to re-fetch if already exists --> - <delete - file="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}.zip" - failonerror="false" /> - - <delete - dir="${WORKSPACE}/tempEBuilder" - failonerror="false" /> - <echo message="Cleaned temporary working copies" /> - - </target> - - <!-- Will leave here for now, though doesn't add much. We had two choices: local, git. - --> - <target - name="fetchEBuilder" - depends="init, fetchEBuilderFromGit" - unless="EBuilderfetched"> - <fail message="EBuilder was not fetched by any available method. Is a local variable not set?" /> - </target> - - <target - name="fetchEBuilderLocal" - depends="init,fetchEBuilderDirect" - if="EBuilderlocal" - unless="EBuilderfetched"> - <echo message="Fetching pre-made EBuilder subset from local machine." /> - <unzip - src="${EBuilderlocal}/${scmProject}-${EBUILDER_HASH}.zip" - dest="${WORKSPACE}" - overwrite="true" /> - - <move - todir="${WORKSPACE}/${folderName}" - failonerror="true"> - <fileset dir="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}"> - <include name="**/*" /> - </fileset> - </move> - - <echo message="Copied EBuilder to ${WORKSPACE}/${folderName}" /> - <property - name="EBuilderfetched" - value="true" /> - </target> - <target - name="fetchEBuilderDirect" - depends="init" - if="downloadURL" - unless="EBuilderfetched"> - <echo message="Fetching pre-made EBuilder subset from download site." /> - <get - src="${downloadURL}/${scmProject}-${EBUILDER_HASH}.zip" - dest="${WORKSPACE}" - httpusecaches="false" - verbose="true" /> - - <available - file="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}.zip" - property="EzipExists" /> - - <antcall target="unzipDownloadedZip" /> - - <condition property="EBuilderfetched"> - <available file="${WORKSPACE}/${folderName}/production" /> - </condition> - - </target> - - <target - name="unzipDownloadedZip" - if="EzipExists"> - - <echo message="Fetched EBuilder from ${downloadURL}" /> - <unzip - src="${WORKSPACE}/${scmProject}-${EBUILDER_HASH}.zip" - dest="${WORKSPACE}" - overwrite="true" /> - - <!-- Not sure this is needed, since 'folderName' and 'scmProject' are - the same. (At least, the defaults set in this script). - --> - <move todir="${WORKSPACE}/${folderName}"> - <fileset dir="${WORKSPACE}/${scmProject}"> - <include name="**/*" /> - </fileset> - </move> - <echo message="Moved EBuilder (subset) to ${WORKSPACE}/${folderName}" /> - - </target> - - - <target - name="initWorkspace" - unless="WORKSPACE"> - <property environment="env" /> - <condition - property="WORKSPACE" - value="${env.WORKSPACE}" - else="${basedir}"> - <isset property="env.WORKSPACE" /> - </condition> - </target> -</project>
\ No newline at end of file diff --git a/production/testScripts/runTests2.xml b/production/testScripts/runTests2.xml deleted file mode 100644 index 51268c6ae..000000000 --- a/production/testScripts/runTests2.xml +++ /dev/null @@ -1,1308 +0,0 @@ -<project - name="runTests2" - default="runTests2" - basedir="."> - - <target - name="init" - depends="initWorkspace, initDownloadHosts, initBuildId, initBuildType, initBasicDirectories, initStreamSpecificVariables, initTargetPlatform, initPlatformSpecificProperties, initCurrentUpdateSite,setJavaMajorVersion" - unless="runTest2Initialized"> - - <property - name="EOL" - value="${line.separator}" /> - - <property - name="selectiveVerbose" - value="false" /> - <!-- - If not explicitly passed in from caller, assume 'all'. This is the - default target already, in global test.xml, but this allows us to be explicit - (and, make sure it continues working). - --> - <condition - property="testSuite" - value="${env.testSuite}" - else="all"> - <isset property="env.testSuite" /> - </condition> - <property - name="buildURL" - value="https://${DOWNLOAD_HOST}/eclipse/downloads/${dropsDirSegment}/${buildId}" /> - - <!-- if 'baselinePerf' is specified, need to it for "buildId", plus adjust - URL to it, not what we just built. Only "tests" always get buildURL --> - <condition - property="buildIdToUse" - value="${baselinePerfVersionLabel}" - else="${buildId}"> - <istrue value="${baselinePerf}" /> - </condition> - <condition - property="repoBuildIdToUse" - value="${baselinePerfBuildId}" - else="${buildId}"> - <istrue value="${baselinePerf}" /> - </condition> - <condition - property="archiveLocation" - value="${baselinePerfLocation}" - else="${buildURL}"> - <istrue value="${baselinePerf}" /> - </condition> - <!-- 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=${baselinePerfVersion}-${buildIdTimestamp};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="-DInternalWriteRawPerformanceData=${eclipse.perf.samples.out} -Declipse.perf.config=${eclipse.perf.config} -Declipse.perf.assertAgainst=${eclipse.perf.assertAgainst}" - else="-DInternalWriteRawPerformanceData=${eclipse.perf.samples.out} -Declipse.perf.config=${eclipse.perf.config}"> - <isset property="eclipse.perf.assertAgainst" /> - </condition> - <echo message="setRuntimeArchive os ${os} ws ${ws} arch ${arch}" /> - <echo message="build id of runtimeArchive ${buildIdToUse}" /> - - <echo message="Variables in 'runTests2.xml'" /> - <echo message="DOWNLOAD_HOST: ${DOWNLOAD_HOST}" /> - <echo message="WORKSPACE: ${WORKSPACE}" /> - <echo message="buildId: ${buildId}" /> - <echo message="buildIdToUse: ${buildIdToUse}" /> - <echo message="relengBaseBuilderDir: ${relengBaseBuilderDir}" /> - <echo message="configurationDir: ${configurationDir}" /> - <echo message="java.home: ${java.home}" /> - <echo message="eclipseStream: ${eclipseStream}" /> - <echo message="eclipseStreamMajor: ${eclipseStreamMajor}" /> - <echo message="eclipseStreamMinor: ${eclipseStreamMinor}" /> - <echo message="buildType: ${buildType}" /> - <echo message="testSuite: ${testSuite}" /> - - - <!-- there's nothing "automatic" about the local cache (so far). If specified - (such as on Hudson command line that executes this file, as, say, -DlocalCache=file:///shared/eclipse/localCache - then all the downloads required must be already available there. It is intended - to speed up local testing to avoid re-downloading files. --> - <!-- currently, following is dead code. Leaving for now as a reminder to - allow localCache again, someday --> - <condition - property="archiveLocation" - value="${localCache}" - else="${buildURL}"> - <isset property="localCache" /> - </condition> - - <echo message="buildURL ${buildURL}" /> - <echo message="archiveLocation ${archiveLocation}" /> - <property - name="runTest2Initialized" - value="true" /> - - </target> - - <target - name="getPlatformIndependentZips" - depends="init" - unless="skipInstall"> - - <get - retries="5" - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-Automated-Tests-${buildIdToUse}.zip" - dest="${testDir}/eclipse-Automated-Tests-${buildIdToUse}.zip" /> - - </target> - - <target - name="getwinzips64" - depends="init, getPlatformIndependentZips" - unless="skipInstall"> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-SDK-${buildIdToUse}-win32-x86_64.zip" - dest="${executionDir}/eclipse-SDK-${buildIdToUse}-win32-x86_64.zip" /> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-platform-${buildIdToUse}-win32-x86_64.zip" - dest="${executionDir}/eclipse-platform-${buildIdToUse}-win32-x86_64.zip" /> - <get - verbose="${selectiveVerbose}" - src="${previousReleaseLocation}/eclipse-platform-${previousReleaseVersion}-win32-x86_64.zip" - dest="${platformLocation}/eclipse-platform-${previousReleaseVersion}-win32-x86_64.zip" /> - </target> - <target - name="getlinzips" - depends="init, getPlatformIndependentZips" - unless="skipInstall"> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-SDK-${buildIdToUse}-linux-gtk-${osgi.arch}.tar.gz" - dest="${executionDir}/eclipse-SDK-${buildIdToUse}-linux-gtk-${osgi.arch}.tar.gz" /> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-platform-${buildIdToUse}-linux-gtk-${osgi.arch}.tar.gz" - dest="${executionDir}/eclipse-platform-${buildIdToUse}-linux-gtk-${osgi.arch}.tar.gz" /> - <get - verbose="${selectiveVerbose}" - src="${previousReleaseLocation}/eclipse-platform-${previousReleaseVersion}-linux-gtk-${osgi.arch}.tar.gz" - dest="${platformLocation}/eclipse-platform-${previousReleaseVersion}-linux-gtk-${osgi.arch}.tar.gz" /> - </target> - - <target - name="getmacosx" - depends="init, getPlatformIndependentZips" - unless="skipInstall"> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-SDK-${buildIdToUse}-macosx-cocoa-${osgi.arch}.dmg" - dest="${executionDir}/eclipse-SDK-${buildIdToUse}-macosx-cocoa-${osgi.arch}.dmg" /> - <get - verbose="${selectiveVerbose}" - src="${archiveLocation}/eclipse-platform-${buildIdToUse}-macosx-cocoa-${osgi.arch}.dmg" - dest="${executionDir}/eclipse-platform-${buildIdToUse}-macosx-cocoa-${osgi.arch}.dmg" /> - <get - verbose="${selectiveVerbose}" - src="${previousReleaseLocation}/eclipse-platform-${previousReleaseVersion}-macosx-cocoa-${osgi.arch}.dmg" - dest="${platformLocation}/eclipse-platform-${previousReleaseVersion}-macosx-cocoa-${osgi.arch}.dmg" /> - </target> - - <target - name="initTargetPlatform" - unless="testPlatform"> - <condition - property="testPlatform" - value="linuxjava14"> - <and> - <equals - arg1="${osgi.os}" - arg2="linux" /> - <equals - arg1="${osgi.ws}" - arg2="gtk" /> - <or> - <equals - arg1="${osgi.arch}" - arg2="x86_64" /> - <equals - arg1="${osgi.arch}" - arg2="ppc64le" /> - <equals - arg1="${osgi.arch}" - arg2="aarch64" /> - </or> - <equals - arg1="${jvm.version}" - arg2="java14" /> - </and> - </condition> - <condition - property="testPlatform" - value="win7-64"> - <and> - <equals - arg1="${osgi.os}" - arg2="win32" /> - <equals - arg1="${osgi.ws}" - arg2="win32" /> - <equals - arg1="${osgi.arch}" - arg2="x86_64" /> - </and> - </condition> - <condition - property="testPlatform" - value="win7"> - <and> - <equals - arg1="${osgi.os}" - arg2="win32" /> - <equals - arg1="${osgi.ws}" - arg2="win32" /> - <equals - arg1="${osgi.arch}" - arg2="x86" /> - </and> - </condition> - - <condition - property="testPlatform" - value="linux"> - <and> - <equals - arg1="${osgi.os}" - arg2="linux" /> - <equals - arg1="${osgi.ws}" - arg2="gtk" /> - <or> - <equals - arg1="${osgi.arch}" - arg2="x86_64" /> - <equals - arg1="${osgi.arch}" - arg2="ppc64le" /> - <equals - arg1="${osgi.arch}" - arg2="aarch64" /> - </or> - </and> - </condition> - <condition - property="testPlatform" - value="macosx"> - <and> - <equals - arg1="${osgi.os}" - arg2="macosx" /> - <equals - arg1="${osgi.ws}" - arg2="cocoa" /> - <or> - <equals - arg1="${osgi.arch}" - arg2="x86_64" /> - <equals - arg1="${osgi.arch}" - arg2="aarch64" /> - </or> - </and> - </condition> - <echo message="[DEBUG] in runTest2.xml: os ws arch ${osgi.os} ${osgi.ws} ${osgi.arch}" /> - <echo message="[INFO] in runTest2.xml: testPlatform ${testPlatform}" /> - </target> - - <!-- Note that in getting the target platform, we nearly always get the - 'buildId' version, the one we just built. But, in some cases, we use "baselinePerf" - version for performance regression testing. In that case, we still get the - "buildId" version of tests ... the ones we just built ... only what we run - them on changes. When we do use 'baselinePerf', that is specified as 'true' - in Hudson job, which signals to use the baselinePerf version defined in 'streamSpecific.properties. --> - <target - name="downloadTargetPlatform" - depends="init"> - <!-- TODO: should add checks for checksum integrity on downloads. Perhaps - use mirror URLs? (though, that'd not effect production) --> - <fail - unless="testPlatform" - message="testPlatform did not match any of the supported combinations of osgi.os, osgi.ws, osgi.arch" /> - <condition - property="getArtifacts" - value="getwinzips"> - <equals - arg1="${testPlatform}" - arg2="win7" /> - </condition> - <condition - property="getArtifacts" - value="getwinzips64"> - <equals - arg1="${testPlatform}" - arg2="win7-64" /> - </condition> - <condition - property="getArtifacts" - value="getlinzips"> - <equals - arg1="${testPlatform}" - arg2="linux" /> - </condition> - <condition - property="getArtifacts" - value="getlinzips"> - <equals - arg1="${testPlatform}" - arg2="linuxjava14" /> - </condition> - - <condition - property="getArtifacts" - value="getmacosx"> - <equals - arg1="${testPlatform}" - arg2="macosx" /> - </condition> - <echo message="getArtifacts ${getArtifacts}" /> - <antcall target="${getArtifacts}" /> - - </target> - - <target name="initConfigurationDir"> - <property - name="configurationDir" - value="${WORKSPACE}/eclipse.platform.releng.aggregator/production/testScripts/configuration" /> - </target> - - <target - name="initPlatformSpecificProperties" - depends="initTargetPlatform, initConfigurationDir" - unless="platformSpecificPropertiesInitialized"> - <property - name="platformSpecificProperties" - value="${configurationDir}/sdk.tests/testConfigs/${testPlatform}/platformSpecific.properties" /> - <loadproperties> - <file file="${platformSpecificProperties}" /> - </loadproperties> - - <property - name="platformSpecificPropertiesInitialized" - value="true" /> - </target> - - <target - name="runTests2" - depends="init, initConfigurationDir, downloadTargetPlatform"> - - <copy - todir="${executionDir}" - verbose="true"> - <fileset dir="${configurationDir}/sdk.tests/testConfigs/${testPlatform}" /> - </copy> - <copy - verbose="true" - todir="${executionDir}" - overwrite="true"> - <fileset dir="${configurationDir}/sdk.tests/testScripts" /> - </copy> - - <echoproperties - description="Echo all properties in runTest2 after all is initialized, shortly before tests are ran." - destfile="${WORKSPACE}/propertiesAllFromRunTest2.properties" /> - - <!-- TODO: seems this unzip could/should be moved to test.xml? To do once - only, of course, if not already done. We (sort of) do in test.xml. See its - setupRepo task. --> - <property - name="repoZip" - value="${executionDir}/eclipse-junit-tests-${repoBuildIdToUse}.zip" /> - <echo message="repoZip: ${repoZip}" /> - <antcall target="unzipTestFramework" /> - - <!-- We print these properties to a file primarily to capture variables - that might have been set in Hudson, which do not "survive" going through - the bat or script files. ... Though, makes me wonder if we really need to - do that? Seems we could call test.xml directly? In principle, we could call - printProperty from anywhere, but seems best to centralize the function. --> - <antcall target="printProductionProperties" /> - - <!-- The PHP properties are useful to display (directly or indirectly) - on "test results" page (such as "testPlatform" headings). --> - <antcall target="printMainPropertiesAsPHP" /> - - <!-- following are all required by "runtests" ... used to be part of it, - but wanted these variables to print out, even if merely testing scripts, - but not actually running tests. --> - <condition - property="executionArguments" - value="/c ${testScript}"> - <and> - <os family="windows" /> - </and> - </condition> - <property - name="executionArguments" - value="${testScript}" /> - - <echo message="=== properties in runTests2, for runTests executable:" /> - <echo message=" = properties used in exec task:" /> - <echo message=" executionDir ${executionDir}" /> - <echo message=" testExecutable ${testExecutable}" /> - <echo message=" testScript ${testScript}" /> - <echo message=" executionArguments ${executionArguments}" /> - <echo message=" = properties set as env variables:" /> - <echo message=" propertiesFile: ${WORKSPACE}/production.properties" /> - <echo message=" jvm: ${jvm}" /> - <echo message=" testedPlatform: ${testedPlatform}" /> - <echo message=" testedPlatformConfig: ${testedPlatformConfig}" /> - - <antcall target="runtests" /> - - </target> - - <target - name="printProductionProperties" - depends="init"> - <!-- here we want to print properties, such as passed in via Hudson, that - can be used later, by test.xml, but since it is started by as separate processes, - there is no direct access to Hudson properties ... so we make them persistent. - In many cases, the property will not be defined, in which case we do not - want to write anything for that property (or, it will appear to have been - set, even if set to an empty string). --> - - <printProperty property="buildId" /> - <printProperty property="buildIdToUse" /> - <printProperty property="buildType" /> - <printProperty property="eclipseStream" /> - <printProperty property="previousReleaseVersion" /> - <printProperty property="previousReleaseVersionRepo" /> - <printProperty property="baselinePerf" /> - <printProperty property="osgi.os" /> - <printProperty property="osgi.ws" /> - <printProperty property="osgi.arch" /> - <printProperty property="DOWNLOAD_HOST" /> - <printProperty property="ARCHIVE_HOST" /> - <printProperty property="executionDir" /> - <printProperty property="install" /> - <printProperty property="eclipse-home" /> - <printProperty property="isMacAppLayout" /> - <printProperty property="configurationDir" /> - <printProperty property="org.eclipse.core.net.prefs" /> - <printProperty property="testSuite" /> - <printProperty property="test.target" /> - <printProperty property="testExecutable" /> - <printProperty property="testScript" /> - <printProperty property="jvm" /> - <printProperty property="javaversionEscaped" /> - <printProperty property="javaMajorVersion" /> - <printProperty property="testedPlatform" /> - <printProperty property="testedPlatformConfig" /> - <printProperty property="eclipse.perf.samples.out" /> - <printProperty property="eclipse.perf.dbloc" /> - <printProperty property="eclipse.perf.config" /> - <printProperty property="eclipse.perf.assertAgainst" /> - <printProperty property="currentUpdateSite" /> - - </target> - - <target - name="initStreamSpecificProperties" - depends="initConfigurationDir" - unless="streamSpecificPropertiesSet"> - <property file="${configurationDir}/streamSpecific.properties" /> - <property - name="streamSpecificPropertiesSet" - value="true" /> - </target> - <target - name="initCurrentUpdateSite" - depends="initDownloadHosts, initStreamVariables, initBuildId, initBuildType" - unless="currentUpdateSite"> - <property - name="currentUpdateSite" - value="https://${DOWNLOAD_HOST}/eclipse/updates/${updateSiteSegment}-${buildType}-builds/${buildId}" /> - </target> - <target - name="checkInstallDir" - if="install"> - <echo message="[DEBUG] in test.xml: Found the value of install already set, to ${install}" /> - </target> - - <target - name="initInstallDir" - depends="initBuildId, initStreamSpecificProperties, checkInstallDir" - unless="install"> - <property - name="testDir" - value="${WORKSPACE}/workarea/${buildId}" /> - <echo message="[DEBUG] in runTests2.xml: testDir: ${testDir}" /> - - <property - name="executionDir" - value="${testDir}/eclipse-testing" /> - <mkdir dir="${executionDir}" /> - <echo message="[DEBUG] in runTests2.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 runTests2.xml: the value of install was 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] in runTest2.xml 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> - - <macrodef name="printProperty"> - <!-- the use of properyfile and local require at least Ant 1.8 --> - <attribute name="property" /> - <sequential> - <echo message="DEBUG @{property}: ${@{property}}" /> - <!-- for our use, 'del' operation won't typically delete anything, since - would not have been there to begin with, but is an easy way to prevent an - undefined property from being written --> - <local name="oper" /> - <condition - property="oper" - value="=" - else="del"> - <isset property="@{property}" /> - </condition> - <propertyfile file="${WORKSPACE}/production.properties"> - <entry - key="@{property}" - value="${@{property}}" - operation="${oper}" /> - </propertyfile> - </sequential> - </macrodef> - - - <!-- This initStreamSpecificVariables target was copied from buildAll.xml - and does about exactly the same thing, purposely left close to original, - though not as much is actually required. TODO: in future, pull out into one - file, and reuse You can tell from comment, it is out dated. Its purpose, - here, is entirely to pick up "stream specific" stings from the releng maps - project, 'configuration' folder. Important note: here, unlike the one in - buildAll.xml, we assume the maps have already been checked out, say by Hudson, - as a peer of eclipseBuilder, rather then us doing the checkout here, ourselves. - Not sure which is easier, but current means Hudson job has to be set up with - two git checkout steps, right version for maps (for 3.8 vs 4.2). --> - <target - name="initStreamSpecificVariables" - unless="initStreamSpecificVariablesComplete" - depends="initWorkspace,initBuildType,initConfigurationDir,initStreamVariables,initDownloadHosts"> - <echo message="DEBUG: executing initStreamSpecificVariables" /> - - <!-- these conditions used to be in "init". Conceptually seems right to - be in "stream specific" init (since their value depends on stream) but may - have side effects?). This is really no longer relevant, as everything we - build/tests comes from "drops4" ... but will leave in case we ever have a - "drops5" ... or, have to back port tests to re-test 3.8! (Which, we probably - do, for 3.8?) --> - <condition - property="dropsDirSegment" - value="drops4" - else="drops"> - <equals - arg1="${eclipseStreamMajor}" - arg2="4" /> - </condition> - - <loadproperties srcFile="${configurationDir}/streamSpecific.properties" /> - - <!-- echo a few typically expected properties, to make sure getting right - file --> - - <echo message="streamSpecificPropertiesTitle: ${streamSpecificPropertiesTitle}" /> - - <echo message="previousReleaseLocation: ${previousReleaseLocation}" /> - <echo message="previousReleaseVersion: ${previousReleaseVersion}" /> - <echo message="previousReleaseVersionRepo: ${previousReleaseVersionRepo}" /> - - <property - name="initStreamSpecificVariablesComplete" - value="true" /> - </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="initWorkspace" - unless="WORKSPACE"> - <property environment="env" /> - <condition - property="WORKSPACE" - value="${env.WORKSPACE}" - else="${basedir}"> - <isset property="env.WORKSPACE" /> - </condition> - </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"> - - <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" /> - - <loadresource property="buildType"> - <string value="${buildId}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="buildType: ${buildType}"/> - - <loadresource property="buildIdTimestamp"> - <string value="${buildId}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^([IMXYNPSRU])(\d{8})-(\d{4})$" replace="\2\3"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="buildIdTimestamp: ${buildIdTimestamp}"/> - <!-- - <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]); - project.setProperty("buildIdTimestamp",sArray[2]+sArray[3]); - ]]> - </script> - --> - - - <fail unless="buildType" /> - </target> - <!-- main purpose of initStreamVariables, it to be sure we have eclipseStreamMajor - and eclipseStreamMinor Uses script, which requires Java 1.6 (or ... else - gets complicated to setup) --> - <target - name="initStreamVariables" - depends="initConfigurationDir" - unless="streamVariablesInitialized"> - <property file="${configurationDir}/streamSpecific.properties" /> - <fail - unless="eclipseStream" - message="eclipseStream value must be provided by caller, such as '4.3' or '4.4.2." /> - <condition property="streamOK"> - <matches - pattern="\d\.\d(\.\d)?" - string="${eclipseStream}" /> - </condition> - <fail - message="eclipseStream variable had unexpected format. Should be of form digit.digit[.digit], but was ${eclipseStream}" - unless="streamOK" /> - - <loadresource property="eclipseStreamMajor"> - <string value="${eclipseStream}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="eclipseStreamMajor: ${eclipseStreamMajor}"/> - - <loadresource property="eclipseStreamMinor"> - <string value="${eclipseStream}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\2"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="eclipseStreamMinor: ${eclipseStreamMinor}"/> - - <loadresource property="updateSiteSegment"> - <string value="${eclipseStream}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="^(\d+)\.(\d+)(\.(\d+))" replace="\1\.\2"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="updateSiteSegment: ${updateSiteSegment}"/> - - <!-- - <script language="javascript"> - <![CDATA[ - var eclipseStream = project.getProperty("eclipseStream"); - var pattern = new - RegExp(/(\d+)\.(\d+)(\.(\d+))?/); - var sArray = pattern.exec(eclipseStream); - // sArray[0] is "whole match" - project.setProperty("eclipseStreamMajor", sArray[1]); - project.setProperty("eclipseStreamMinor", sArray[2]); - // zero based: index 3 is 4th item, etc, and we have digit only in a nested group (due to optional) - if (sArray.length > 4) { - project.setProperty("eclipseStreamService", sArray[4]); - } - project.setProperty("updateSiteSegment", sArray[1] + "." + sArray[2]); - ]]> - </script> - --> - - <fail - unless="eclipseStreamMajor" - message="eclipseStreamMajor not defined or computable" /> - <fail - unless="eclipseStreamMinor" - message="eclipseStreamMinor not defined or computable" /> - <fail - unless="updateSiteSegment" - message="updateSiteSegment not defined or computable" /> - <property - name="streamVariablesInitialized" - value="true" /> - - </target> - - <target - name="initBasicDirectories" - depends="initWorkspace,initBuildId, initStreamSpecificProperties,initInstallDir, initEclipseHome, initPlatformSpecificProperties, setJavaMajorVersion" - unless="basicDirectoriesInitialized"> - - <property environment="env" /> - - <property - name="repoZip" - value="${executionDir}/eclipse-junit-tests-${repoBuildIdToUse}.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}" /> - - <property - name="testedPlatformConfig" - value="${osgi.os}.${osgi.ws}.${osgi.arch}" /> - - <property - name="testedPlatform" - value="${env.JOB_NAME}_${osgi.os}.${osgi.ws}.${osgi.arch}_${javaMajorVersion}" /> - - <!-- 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}" /> - - <property - name="eclipse.perf.samples.out" - value="${results}/${testedPlatform}-perf-samples.dat" /> - <echo message="eclipse.perf.samples.out: ${eclipse.perf.samples.out}" /> - - - <!-- 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 task unzips the test framework that was built. It includes misc. - files, the Test Framework proper, and a zipped up repo of the unit tests. - We also do this in "testAll" scripts ...? TODO: investigate how to avoid - doing there, if already done. --> - <target name="unzipTestFramework"> - <fail unless="testDir" /> - <fail unless="buildIdToUse" /> - - <property - name="testResults" - value="${testDir}/testresults" /> - <property - name="testFramework" - value="${testDir}/eclipse-Automated-Tests-${buildIdToUse}.zip" /> - - <condition property="testFrameworkExists"> - <available file="${testFramework}" /> - </condition> - <fail unless="testFrameworkExists" /> - - <echo message="testFramework: ${testFramework}" /> - <echo message="testDir: ${testDir}" /> - <echo message="testResults: ${testResults}" /> - - <!--set up testing directory --> - <unzip - src="${testFramework}" - dest="${testDir}" - overwrite="false"> - <patternset> - <exclude name="**/equinoxp2tests.properties" /> - <exclude name="**/test.xml" /> - </patternset> - </unzip> - </target> - - <target - name="runtests" - depends="init" - unless="env.TESTING_TEST_XML"> - - <!--run the tests --> - <exec - dir="${executionDir}" - executable="${testExecutable}"> - <arg line="${executionArguments}" /> - <arg value="${testSuite}" /> - <env - key="propertyFile" - file="${WORKSPACE}/production.properties" /> - <env - key="jvm" - file="${jvm}" /> - <env - key="testedPlatform" - value="${testedPlatform}" /> - </exec> - </target> - - <!-- Prints properties in "PHP form" to use on test results summary, to - be sure accurate and meaningful. --> - <target - name="printMainPropertiesAsPHP" - depends="init" - unless="printedMainPHPProperties"> - - <property - name="EOL" - value="${line.separator}" /> - - - <property - name="phpPropertyFile" - value="${junit-report-output}/testProperties.php" /> - - <!-- on first write to php file, don't append --> - <echo - message="<?php${EOL}" - append="false" - file="${phpPropertyFile}" /> - <escapeProperty property="ant.version" /> - <printPHPProperty - phpvar="ANT_VERSION" - value="ant.versionEscaped" /> - <printPHPProperty - phpvar="ANT_JAVA_VERSION" - value="ant.java.versionEscaped" /> - <printPHPProperty - phpvar="INVOKED_JAVA_VERSION" - value="javaversionEscaped" /> - <!-- Note: there might be times, the java.runtime.version at this point - in time, may not be quite right ... such as if invoked with some other VM - with the intent of using 'jvm' on "eclipse" command line ... which we currently - do not do. --> - <printPHPProperty - phpvar="JAVA_VERSION" - value="java.version" /> - <printPHPProperty - phpvar="JAVA_MAJOR_VERSION" - value="javaMajorVersion" /> - <printPHPProperty - phpvar="JAVA_RUNTIME_VERSION" - value="java.runtime.version" /> - <printPHPProperty - phpvar="JAVA_VM_INFO" - value="java.vm.info" /> - <printPHPProperty - phpvar="JAVA_SPECIFICATION_VERSION" - value="java.specification.version" /> - <printPHPProperty - phpvar="JAVA_VENDOR" - value="java.vendor" /> - <printPHPProperty - phpvar="OSGI_OS" - value="osgi.os" /> - <printPHPProperty - phpvar="OSGI_WS" - value="osgi.ws" /> - <printPHPProperty - phpvar="OSGI_ARCH" - value="osgi.arch" /> - <!-- NODE_NAME will be empty string, if on master --> - <condition - property="hudsonSlave" - value="master"> - <or> - <not> - <isset property="env.NODE_NAME" /> - </not> - <equals - arg1="${env.NODE_NAME}" - arg2="" /> - <equals - arg1="${env.NODE_NAME}" - arg2=" " /> - </or> - </condition> - <!-- if not set above, we'll set to the non blank NODE_NAME --> - <property - name="hudsonSlave" - value="${env.NODE_NAME}" /> - - <printPHPProperty - phpvar="HUDSON_NODE_NAME" - value="hudsonSlave" /> - <!-- I believe all (common) platforms have env variable for HOSTNAME. If - not, user might want to set/export to be meaningful. (Surprisingly, it doesn't - seem obvious that Hudson makes this available in its process environment). --> - <printPHPProperty - phpvar="HOSTNAME" - value="env.HOSTNAME" /> - <printPHPProperty - phpvar="HUDSON_JOB_NAME" - value="env.JOB_NAME" /> - <printPHPProperty - phpvar="HUDSON_BUILD_NUMBER" - value="env.BUILD_NUMBER" /> - <printPHPProperty - phpvar="HUDSON_BUILD_URL" - value="env.BUILD_URL" /> - <!-- With HUDSON_URL and WORKSPACE_PATH should be able to figure out URL - to WORKSPACE, though only temporarily available (until next job is ran). --> - <printPHPProperty - phpvar="HUDSON_URL" - value="env.HUDSON_URL" /> - <printPHPProperty - phpvar="HUDSON_WORKSPACE" - value="env.WORKSPACE" /> - <printPHPProperty - phpvar="TESTED_RUNTIME_ID" - value="buildIdToUse" /> - <printPHPProperty - phpvar="TEST_TARGET" - value="test.target" /> - <printPHPProperty - phpvar="ECLIPSE_PERF_SAMPLES_OUT" - value="eclipse.perf.samples.out" /> - <printPHPProperty - phpvar="ECLIPSE_PERF_DBLOC" - value="eclipse.perf.dbloc" /> - - <printPHPProperty - phpvar="ECLIPSE_PERF_CONFIG" - value="eclipse.perf.config" /> - <printPHPProperty - phpvar="ECLIPSE_PERF_ASSERTAGAINST" - value="eclipse.perf.assertAgainst" /> - - <!-- We end with an empty line, but it is recommended to not end included - PHP files with "end PHP" marker. --> - <echo - message="${EOL}" - append="true" - file="${phpPropertyFile}" /> - - <!-- set property so we only print these variables once --> - <property - name="printedMainPHPProperties" - value="true" /> - - </target> - <target - name="setJVMProperties" - depends="initPlatformSpecificProperties,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. --> - <property - name="jvm" - value="${java.home}/bin/java" /> - - <exec - executable="${jvm}" - outputproperty="javaversion"> - <arg line="-version" /> - </exec> - <echo message="full output from 'java -version' of ${jvm} is " /> - <echo message="${javaversion}" /> - <escapeProperty property="javaversion" /> - <echo message="full output from 'java -version' of ${jvm} is " /> - <echo message="${javaversionEscaped}" /> - - <!--enable tests requiring 1.5 or or greater vms to run if running vm level - detected matches required execution environment --> - <condition - property="J2SE-8.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[8]' /> - </condition> - <condition - property="J2SE-7.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[78]' /> - </condition> - <condition - property="J2SE-6.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[678]' /> - </condition> - <condition - property="J2SE-5.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[5678]' /> - </condition> - <echo - level="info" - message="DEBUG: values from setJVMfromUserSpecified" /> - <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="setJVMfromUserSpecified" - if="jvm" - unless="javaversionEscaped"> - - <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 line="-version" /> - </exec> - <echo message="full output from 'java -version' of ${jvm} is " /> - <echo message="${javaversion}" /> - <escapeProperty property="javaversion" /> - <echo message="full output from 'java -version' of ${jvm} is " /> - <echo message="${javaversionEscaped}" /> - - <condition - property="J2SE-8.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[8]' /> - </condition> - <condition - property="J2SE-7.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[78]' /> - </condition> - <condition - property="J2SE-6.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[678]' /> - </condition> - <condition - property="J2SE-5.0" - value="${jvm}"> - <matches - string="${javaversionEscaped}" - pattern='^.*java version .*1\.[5678]' /> - </condition> - <echo - level="info" - message="DEBUG: values from setJVMfromUserSpecified" /> - <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> - <!-- 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="setJavaMajorVersion" - depends="setJVMProperties" - unless="javaMajorVersion"> - - <echo message="javaversion in setJavaMajorVersion: ${javaversionEscaped}" /> - - <loadresource property="javaMajorVersion"> - <string value="${java.version}"/> - <filterchain> - <tokenfilter> - <replaceregex pattern="(\d+)[\.-].*" replace="\1"/> - </tokenfilter> - </filterchain> - </loadresource> - <echo message="javaMajorVersion: ${javaMajorVersion}"/> - <!-- - <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 javaVer = project.getProperty("javaversionEscaped"); - var pattern = new RegExp(/^.*1\.([456789]\.\d)/); - var sArray = pattern.exec(javaVer); - // sArray 0 is "whole match" - // so can always exist if any match, - // but can be null if no match? - // For safety from programing - // errors, we'll check for null and length - if (sArray != null) { - var length = sArray.length; - if (length > 1) { - project.setProperty("javaMajorVersion", sArray[1]); - } else { - project.setProperty("javaMajorVersion", "0"); - } - } else { - var pattern = new RegExp(/^\D*\"(\d+)[\.\\\"-].*/); - var sArray = pattern.exec(javaVer); - if (sArray != null) { - var length = sArray.length; - if (length > 0) { - project.setProperty("javaMajorVersion", sArray[1]); - } else { - project.setProperty("javaMajorVersion", "0"); - } - } - } - ]]> - </script> - --> - </target> - - <macrodef name="printPHPProperty"> - <attribute name="phpvar" /> - <attribute name="value" /> - <sequential> - <!-- DEBUG <echo message="@{value}" /> --> - <condition - property="printValue@{value}" - value="${@{value}}" - else="NotSet"> - <isset property="@{value}" /> - </condition> - <echo - message="$@{phpvar}="${printValue@{value}}";${EOL}" - file="${phpPropertyFile}" - append="true" /> - </sequential> - </macrodef> - <macrodef name="escapeProperty"> - <!-- the use of propertyfile and local require at least Ant 1.8 --> - <attribute name="property" /> - <sequential> - <echo message="DEBUG @{property}: ${@{property}}" /> - <loadresource property="@{property}Escaped"> - <propertyresource name="@{property}" /> - <filterchain> - <tokenfilter> - <filetokenizer /> - <replacestring - from='"' - to='\"' /> - </tokenfilter> - </filterchain> - </loadresource> - </sequential> - </macrodef> -</project> diff --git a/production/testScripts/startTests.sh b/production/testScripts/startTests.sh deleted file mode 100755 index 57116e2c2..000000000 --- a/production/testScripts/startTests.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env bash - -# this localBuildProperties.shsource file is to ease local builds to override some variables. -# It should not be used for production builds. -source localBuildProperties.shsource 2>/dev/null -export BUILD_HOME=${BUILD_HOME:-/shared/eclipse/builds} - -# Small utility to start unit tests (or re-run them) after a build -# and after upload to downloads server is complete. - -# need to be running Java 6 and Ant 1.8 for <script> to work in invokeTestsJSON -# and, default on current build system is Ant 1.7 ... so ... -export ANT_HOME=/shared/common/apache-ant-1.9.6 - -function usage () -{ - printf "\t\t%s\n" "usage: " - printf "\t\t%s\n" "$( basename $0 ) eclipseStream buildId" - printf "\t\t\t%s\n" "where " - printf "\t\t\t%s\n" "eclipseStream == 4.3.0, 3.8.2, etc. " - printf "\t\t\t%s\n" "buildId == M20120705-1200, IM20121005-0800, etc. " - printf "\t\t\t\t%s\n" "or, provide those parameters in buildParams.shshource on search path" -} - -# compute main (left part) of download site -function dlpath() -{ - eclipseStream=$1 - if [[ -z "${eclipseStream}" ]] - then - printf "\n\n\t%s\n\n" "ERROR: Must provide eclipseStream as first argument, for this function $(basename $0)" - return 1; - fi - - - buildId=$2 - if [[ -z "${buildId}" ]] - then - printf "\n\n\t%s\n\n" "ERROR: Must provide buildId as second argument, for this function $(basename $0)" - return 1; - fi - - eclipseStreamMajor=${eclipseStream:0:1} - buildType=${buildId:0:1} - - pathToDL=eclipse/downloads/drops - if (( $eclipseStreamMajor > 3 )) - then - pathToDL=$pathToDL$eclipseStreamMajor - fi - - echo $pathToDL -} - - -# This file, buildParams.shsource, normally does not exist on build system, -# but can be provided if running "by hand" as an easy way to provide the -# parameters required. For example, the contents might be -# eclipseStream=4.2.1 -# buildId=M20120705-1200 -# -source buildParams.shsource 2>/dev/null - -# can provide eclipseStream and buildId as first two args to this script -# which is how invoke from "promote script" -eclipseStream=${eclipseStream:-${1}} -buildId=${buildId:-${2}} -EBUILDER_HASH=${EBUILDER_HASH:-${3}} - -if [[ -z ${eclipseStream} || -z ${buildId} ]] -then - printf "\n\t%s\n" "ERROR: missing required parameters." - usage - exit 1 -fi - -if [[ -z "${EBUILDER_HASH}" ]] -then - EBUILDER_HASH=master -fi - -# contrary to intuition (and previous behavior, bash 3.1) do NOT use quotes around right side of expression. -if [[ "${eclipseStream}" =~ ^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)$ ]] -then - eclipseStreamMajor=${BASH_REMATCH[1]} - eclipseStreamMinor=${BASH_REMATCH[2]} - eclipseStreamService=${BASH_REMATCH[3]} -else - printf "\n\t%s\n" "ERROR: eclipseStream, $eclipseStream, must contain major, minor, and service versions." - usage - exit 1 -fi - -if [[ "${buildId}" =~ ([MNIXYPU]+)([[:digit:]]*)\-([[:digit:]]*) ]] -then - # old, simpler way, if we don't do regex and input checking - #buildType=${buildId:0:1} - buildType=${BASH_REMATCH[1]} -else - printf "\n\t%s\n" "ERROR: buildId, $buildId, did not match expected pattern." - usage - exit 1 -fi - - - -echo "values in ${0}" -echo "eclipseStream: $eclipseStream" -echo "eclipseStreamMajor: $eclipseStreamMajor" -echo "eclipseStreamMinor: $eclipseStreamMinor" -echo "eclipseStreamService: $eclipseStreamService" -echo "buildType: $buildType" -echo "buildId: $buildId" -echo "EBUILDER_HASH: $EBUILDER_HASH" -echo "BUILD_HOME: ${BUILD_HOME}" - - buildRoot=${BUILD_HOME}/${eclipseStreamMajor}${buildType} - eclipsebuilder=eclipse.platform.releng.aggregator/production/testScripts - dlPath=$( dlpath $eclipseStream $buildId ) - echo "DEBUG dlPath: $dlPath" - buildDropDir=${buildRoot}/siteDir/$dlPath/${buildId} - echo "DEBGUG buildDropDir: $buildDropDir" - builderDropDir=${buildDropDir}/${eclipsebuilder} - echo "DEBUG: builderDropDir: ${builderDropDir}" - -echo "DEBUG: invoking test scripts on Hudson" - -HUDSON_TOKEN=windows2012tests ant \ - -DpostingDirectory=${buildDropDir} \ - -DbuildId=${buildId} \ - -DeclipseStream=${eclipseStream} \ - -DEBUILDER_HASH=${EBUILDER_HASH} \ - -f ${builderDropDir}/invokeTestsJSON.xml - diff --git a/production/testScripts/test_runTests2.xml.sh b/production/testScripts/test_runTests2.xml.sh deleted file mode 100755 index 46b38a1ee..000000000 --- a/production/testScripts/test_runTests2.xml.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env bash - -# Utility to test the runTests2.xml file. It's intended to allow rapid confirmation -# that the runTests2.xml file computes correct values, for various versions platforms -# and various versions of java and ant, etc. - -# In particular, ant can be invoked with one version of java, but another version -# of java used to actually run the tests. - -# In addition to the console output. which should be captured, with something like -# ./testTextXMLScript.sh | tee testoutput.txt -# some data or set-up files will be created as they normally would if running the real tests. -# The can be checked to be sure they are correct, and in correct (relative) locations. - -# unset some common variables which we don't want (or, set ourselves) -unset JAVA_HOME -unset JAVA_ROOT -unset JAVA_JRE -unset CLASSPATH -unset JAVA_BINDIR -unset JRE_HOME - -function clean() -{ - - echo -e "\n Cleaning previous results, as requested." - # remember, do not want to rm "out.txt" since we may be currently piping to it via 'tee'. - rm -fr ${WORKSPACE}/eclipse.platform.releng.aggregator/ eclipse.platform.releng.aggregator-master.zip getEBuilder.xml runTests2.xml tempEBuilder/ - - rm -fr ${WORKSPACE}/production.properties propertiesAllFromRunTest2.properties sdk.tests streamSpecific-build.properties workarea - -} - -source localBuildProperties.shsource 2>/dev/null -# Different versions of Ant are specified here in test script, just to confirm -# nothing is specific to any recent version of ant. (Though, some of the machines -# have ant 1.6 set as 'default'!) -export ANT_HOME=/shared/common/apache-ant-1.9.6 - -# JAVA_HOME is, at least, what runs the ant instance. If no 'jvm' option is specified, -# it also becomes the instance that runs the tests. -JAVA_11_HOME=/opt/public/common/java/openjdk/jdk-11_x64-latest -export JAVA_HOME=${JAVA_HOME:-${JAVA_11_HOME}} - -# added /opt/local/bin for 'port' version of wget, on Mac -export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:/usr/local/bin:/usr/bin:/bin:${HOME}/bin:/opt/local/bin - -# Be sure to set to a "fresh" non-cluttered area, so can be easily cleaned up. -export WORKSPACE=${HOME}/tempworkarea - -# This variable signals parts of the script that we are testing the test scripts, -# and should not actually start the tests. -export TESTING_TEST_XML=true -#export ANT_OPTS=-Xms1024m -Xmx1024m -Djava.io.tmpdir=${WORKSPACE}/tmp -export ANT_OPTS=-Djava.io.tmpdir=${WORKSPACE}/tmp -mkdir -p ${WORKSPACE}/tmp -if [[ "$1" == "-c" ]] -then - clean -fi - -if [[ -z "${GIT_HOST}" ]] -then - GIT_HOST=git.eclipse.org -fi - -# print basic diagnostics and properties -ant -diagnostics -java -XshowSettings -version - -# Note: currently this file always comes from master, no matter what branch is being built/tested. -wget -O ${WORKSPACE}/getEBuilder.xml --no-verbose https://${GIT_HOST}/c/platform/eclipse.platform.releng.aggregator.git/plain/production/testScripts/hudsonBootstrap/getEBuilder.xml 2>&1 - -# or test the local version, checked-out version from tree location, -# not necessarily checked in, yet, though many other -# files are still checked out. -# cp -v hudsonBootstrap/getEBuilder.xml ${WORKSPACE}/ - -# Can only test the "downloadURL form" if there is a current, accurate build. -# During development, should use git/master version. (Not sure what this downloads, then?) - -ANTFILE=getEBuilder.xml -buildId=I20150320-0800 -eclipseStream=4.23.0 -EBUILDER_HASH=master -#EBUILDER_HASH=4295494c43e464a0c4ee39b7e0c847fbc3263f2a - -# Record where we are executing from. -echo "PWD: $PWD" - -# ? There are a number of test-<something> methods in test xml which, by convention, mean -# to simply test the test script itself. The test-all target runs all of those tests. -# MUST change the arch values here, then testing on other platforms! -ant -f "${WORKSPACE}/${ANTFILE}" -Dbasebuilderlocal=/shared/eclipse/buildtests -DbuildId=$buildId -DeclipseStream=$eclipseStream -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dtest.target=performance -#ant -f "${WORKSPACE}/${ANTFILE}" -Dbasebuilderlocal=/shared/eclipse/buildtests -DbuildId=$buildId -DeclipseStream=$eclipseStream -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=x86_64 -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dtest.target=performance -rc=$? -if [[ $rc == 0 ]] -then - echo "Ant returned non-zero return code: $rc." -else - echo "Ant returned normally. (Check log for BUILD FAILED/SUCCESS)" -fi -echo "check output in ${WORKSPACE}, especially ${WORKSPACE}/workarea" diff --git a/production/testScripts/updateTestResultsPages.sh b/production/testScripts/updateTestResultsPages.sh deleted file mode 100755 index 7214c1f20..000000000 --- a/production/testScripts/updateTestResultsPages.sh +++ /dev/null @@ -1,355 +0,0 @@ -#!/usr/bin/env bash - -# Utility to invoke eclipse antrunner to update test index pages and -# re-sync dl site. - -# this localBuildProperties.shsource file is to ease local builds to override some variables. -# It should not be used for production builds. -source localBuildProperties.shsource 2>/dev/null - - -function show_time () { -num=$1 -min=0 -hour=0 -day=0 -if((num>59));then - ((sec=num%60)) - ((num=num/60)) - if((num>59));then - ((min=num%60)) - ((num=num/60)) - if((num>23));then - ((hour=num%24)) - ((day=num/24)) - else - ((hour=num)) - fi - else - ((min=num)) - fi -else - ((sec=num)) -fi -echo "$day d $hour h $min m $sec s" -} - - -if (( $# < 3 )) -then - # usage: - scriptname=$(basename $0) - printf "\n\t%s\n" "This script, $scriptname requires three arguments, in order: " - printf "\t\t%s\t%s\n" "eclipseStream" "(e.g. 4.2.0 or 3.8.0) " - printf "\t\t%s\t%s\n" "buildId" "(e.g. N20120415-2015) " - printf "\t\t%s\t%s\n" "jobName" "(e.g. ep4I-unit-lin64) " - printf "\t\t%s\t%s\n" "jobNumber" "(e.g. 59) " - printf "\t%s\n" "for example," - printf "\t%s\n\n" "./$scriptname 4.2.0 N20120415-2015 ep4I-unit-lin64 59" - exit 1 -fi - -eclipseStream=$1 -if [ -z "${eclipseStream}" ] -then - echo "must provide eclipseStream as first argument, for this function $0" - exit 1 -fi - - -buildId=$2 -if [ -z "${buildId}" ] -then - echo "must provide buildId as second argument, for this function $0" - exit 1 -fi - -JOB_NAME=$3 -if [ -z "${JOB_NAME}" ] -then - echo "must provide JOB_NAME as third argument, for this function $0" - exit 1 -fi - -JOB_NUMBER=$4 -if [ -z "${JOB_NUMBER}" ] -then - # technically, not required, though later may want to force and error, since - # probably indicates something is wrong. - echo -e "\n\tERROR: JOB_NUMBER as fourth argument, not provided to this function $0. Exiting." - exit 1 -fi - - -eclipseStreamMajor=${eclipseStream:0:1} -buildType=${buildId:0:1} - -pathToDL=eclipse/downloads/drops -if (( $eclipseStreamMajor > 3 )) -then - pathToDL=eclipse/downloads/drops$eclipseStreamMajor -fi - -buildRoot=${BUILD_HOME}/${eclipseStreamMajor}${buildType} - -siteDir=${buildRoot}/siteDir - -fromDir=${siteDir}/${pathToDL}/${buildId} -if [ ! -d "${fromDir}" ] -then - echo "ERROR: fromDir is not a directory? fromDir: ${fromDir}" - exit 1 -fi - -JAVA_11_HOME=${JAVA_11_HOME:-/opt/public/common/java/openjdk/jdk-11_x64-latest} - -export JAVA_HOME=${JAVA_HOME:-${JAVA_11_HOME}} - -devJRE=$JAVA_HOME/jre/bin/java - -if [[ ! -n ${devJRE} && -x ${devJRE} ]] -then - echo "ERROR: could not find (or execute) JRE where expected: ${devJRE}" - exit 1 -else - # display version, just to be able to log it. - echo "JRE Location and Version: ${devJRE}" - echo $( $devJRE -version ) -fi - -# We use a separate basebuilder for each "drop", to make sure it is specific for that drop, -# and they won't interfere with each other. -basebuilderDir=${fromDir}/org.eclipse.releng.basebuilder -aggregatorDir=${fromDir}/eclipse.platform.releng.aggregator -EBuilderDir=${aggregatorDir}/eclipse.platform.releng.tychoeclipsebuilder - -if [[ ! -d "${basebuilderDir}" ]] -then - # WORKSPACE, here, is the "Hudson-type" of workspace, not eclipse. - ant -f $EBuilderDir/eclipse/getBaseBuilderAndTools.xml -DWORKSPACE=${fromDir} -fi - -# remember, the Eclipse install must match the VM used (e.g. both 64 bit, both 32 bit, etc). -ECLIPSE_EXE="${basebuilderDir}/eclipse" -# somehow, seems like this is often not executable ... I guess launcher jar usually used. -chmod -c +x $ECLIPSE_EXE - -if [ ! -n ${ECLIPSE_EXE} -a -x ${ECLIPSE_EXE} ] -then - echo "ERROR: ECLIPSE_EXE is not defined or not executable: ${ECLIPSE_EXE}" - exit 1 -fi - -# Normal unit tests -unittestJobPattern="^.*-unit-.*$" - -#if [[ $JOB_NAME =~ ${unittestJobPattern} ]] -#then - -BUILDFILE=${aggregatorDir}/production/testScripts/genTestIndexes.xml - -BUILDFILESTR="-f ${BUILDFILE}" -echo -echo " BUILDFILESTR: $BUILDFILESTR" - -# provide blank, to get default -BUILDTARGET=" " - -devworkspace="${fromDir}/workspace-updateTestResults" -devArgs="-Xmx512m -Dhudson=true -DbuildHome=${BUILD_HOME} -DeclipseStream=${eclipseStream} -DeclipseStreamMajor=${eclipseStreamMajor} -DbuildId=${buildId} -Djob=$JOB_NAME" - -echo -echo " = = Properties in updateTestResultsPages.sh: generate section = = " -echo " dev script: $0" -echo " BUILD_HOME: ${BUILD_HOME}" -echo " devworkspace: $devworkspace" -echo " devArgs: $devArgs" -echo " devJRE: $devJRE" -echo " BUILDFILESTR: $BUILDFILESTR" -echo " job: $JOB_NAME" -echo - -if [ -n ${ECLIPSE_EXE} -a -x ${ECLIPSE_EXE} ] -then - - ${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -consolelog -data $devworkspace -application org.eclipse.ant.core.antRunner $BUILDFILESTR $BUILDTARGET -vm $devJRE -vmargs $devArgs - RC=$? - if [[ $RC != 0 ]] - then - echo "ERROR: eclipse returned non-zero return code, exiting with RC: $RC." - exit $RC - fi -else - echo "ERROR: ECLIPSE_EXE is not defined to executable eclipse." - RC=1 - exit $RC -fi - -#fi - -perfJobPattern="^.*-perf-.*$" -perfBaselineJobPattern="^.*-perf-.*-baseline.*$" - -if [[ $JOB_NAME =~ $perfJobPattern && ! $JOB_NAME =~ $perfBaselineJobPattern ]] -then - # We run the "performance analysis" tools only on "current" build, for jobs that contain -perf- (and do not contain -baseline) - - devArgs="-Xmx512m" - - - echo "Collected a performance run result. Doing performance analysis for $JOB_NAME" - echo - echo " dev script: $0" - echo " buildRoot: $buildRoot" - echo " BUILD_HOME: ${BUILD_HOME}" - echo " pathToDL: $pathToDL" - echo " siteDir: $siteDir" - echo " fromDir: $fromDir" - echo " devworkspace: $devworkspace" - echo " devArgs: $devArgs" - echo " devJRE: $devJRE" - echo " JOB_NAME: $JOB_NAME" - echo " JOB_NUMBER: $JOB_NUMBER" - echo - echo " perfrepoLocation: $perfrepoLocation" - - echo " = = Now run performance.ui app = =" - devworkspace="${fromDir}/workspace-updatePerfResults" - eclipse_perf_dbloc_value=${eclipse_perf_dbloc_value:-/shared/eclipse} - vmargs="-Xmx1G -Declipse.perf.dbloc=${eclipse_perf_dbloc_value}" - postingDirectory=$fromDir - perfOutput=$postingDirectory/performance - # assuming for now the intent is that 'data' is meant to accumulate in common location - # common location doesn't seem to work, with our multi-run method. So, will - # make unique, for now. (Might work ok, if we just had "short set" and "long set" locations? - ROOT_PERF_DATA=/shared/eclipse/perfdataDir - - # experiment with deleting previous .dat files, and regenerate all that are needed. - # (I believe they are a "performance improvement" for the test analysis itself, but - # I suspect they make a lot of assumptions that are no longer true. - rm -fr ${ROOT_PERF_DATA} - RC=$? - if [[ $RC != 0 ]] - then - echo "Could not remove ${ROOT_PERF_DATA}. Return code was $RC. Exiting." - exit $RC - fi - # re-create - mkdir -p ${ROOT_PERF_DATA} - RC=$? - if [[ $RC != 0 ]] - then - echo "Could not mkdir -p ${ROOT_PERF_DATA}. Return code was $RC. Exiting." - exit $RC - fi - # Will try "just one". Might get some better results, now that bug 481272 has been fixed. - dataDir=${ROOT_PERF_DATA} - # dataDir=${ROOT_PERF_DATA}/${buildId}_${JOB_NAME}_${JOB_NUMBER} - # make anew - # mkdir -p "${dataDir}" - # RC=$? - # if [[ $RC != 0 ]] - # then - # echo "Could not mkdir -p $dataDir. Return code was $RC. Exiting." - # exit $RC - # fi - - # The performance UI function needs a DISPLAY to function, so we'll give it one via xvfb - # if running on Hudson, be sure "use xvnc" is checked. - # If not running on Hudson, can use this xvfb-run utility, - # distributed with xvfb as a "build time only" requirement. - echo -e "\n\t[DEBUG] RUNNING_ON_HUDSON: ${RUNNING_ON_HUDSON}\n" - if [[ "${RUNNING_ON_HUDSON}" == "false" ]] - then - XVFB_RUN="xvfb-run" - if [[ ! -w "${TMP_DIR}" ]] - then - echo -e "\n\tTMP_DIR not defined, so will create at ${buildRoot}/tmp" - TMP_DIR="${buildRoot}/tmp" - mkdir -p "${TMP_DIR}" - fi - XVFB_RUN_ARGS="--error-file ${TMP_DIR}/xvfbErrorFile.txt" - # --server-args -screen 0 1024x768x24" - else - echo -e "\n\t[INFO] Running on Hudson, be sure Xvnc is checked." - fi - # - if [[ ${buildType} =~ [INM] ]] - then - if [[ "${buildType}" == "M" ]] - then - current_prefix=" -current.prefix M " - else - current_prefix=" -current.prefix I,N " - fi - else - echo -e "\n\tPROGRAM ERROR: build type did not equal expected value (M or N or I). Exiting." - exit 1 - fi - - #PERF_OUTFILE="${fromDir}/performance/perfAnalysis_${buildId}_${JOB_NAME}_${JOB_NUMBER}.txt" - echo "Beginning performance analysis. - #Results in ${PERF_OUTFILE}." - mkdir -p "${fromDir}/performance" - RAW_DATE_START=$( date -u +%s ) - - # TODO: avoid this hard coding of baseline value - # NOTE: value must start with a letter match baselinePerfVersion in testScripts/configuration/streamSpecific.properties - baselineCode="R-4.22-202111241800" - # to get time stamp, first remove initial IMN: - baselineForBuildSuffix=${buildId/[IMN]/} - #Then remove final '-' in build id - baselineForBuildSuffix=${baselineForBuildSuffix/-/} - # then form "final" baseline code with true base line with -timestamp - baselineForCurrent="${baselineCode}-${baselineForBuildSuffix}" - - #echo -e "\n\tDEBUG RAW Date Start: ${RAW_DATE_START} \n" - echo -e "\n\tStart Time: $( date +%Y%m%d%H%M%S -d @${RAW_DATE_START} ) \n" #>${PERF_OUTFILE} - echo " = = Properties in updateTestResultsPages.sh: performance.ui.resultGenerator section = = " ##>>${PERF_OUTFILE} - echo " dev script: $0" #>>${PERF_OUTFILE} - echo - echo " buildId: $buildId" - echo " baselineCode: ${baselineCode}" - echo " baselineForCurrent: ${baselineForCurrent}" - echo - echo " buildRoot: $buildRoot" #>>${PERF_OUTFILE} - echo " BUILD_HOME: ${BUILD_HOME}" #>>${PERF_OUTFILE} - echo " pathToDL: $pathToDL" #>>${PERF_OUTFILE} - echo " siteDir: $siteDir" #>>${PERF_OUTFILE} - echo " fromDir: $fromDir" #>>${PERF_OUTFILE} - echo " devworkspace: $devworkspace" #>>${PERF_OUTFILE} - echo " vmargs: $vmargs" #>>${PERF_OUTFILE} - echo " devJRE: $devJRE" #>>${PERF_OUTFILE} - echo " BUILDFILESTR: $BUILDFILESTR" #>> ${PERF_OUTFILE} - echo " JOB_NAME: $JOB_NAME" #>> ${PERF_OUTFILE} - echo " JOB_NUMBER: $JOB_NUMBER" #>> ${PERF_OUTFILE} - echo " XVFB_RUN_ARGS $XVFB_RUN_ARGS" #>> ${PERF_OUTFILE} - echo " current_prefix ${current_prefix}" #>> ${PERF_OUTFILE} - echo #>> ${PERF_OUTFILE} - - ${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -consolelog -debug -data $devworkspace -application org.eclipse.test.performance.ui.importPerformanceData $perfOutput/*-perf-samples.dat -vm ${devJRE} -vmargs ${vmargs} - RC=$? - if [[ $RC != 0 ]] - then - echo "ERROR: eclipse returned non-zero return code from invoking performance data import, exiting with RC: $RC." - exit $RC - fi - - ${XVFB_RUN} ${XVFB_RUN_ARGS} ${ECLIPSE_EXE} --launcher.suppressErrors -nosplash -consolelog -debug -data $devworkspace -application org.eclipse.test.performance.ui.resultGenerator -baseline ${baselineForCurrent} -current ${buildId} -jvm 8.0 -config linux.gtk.x86_64 -config.properties "linux.gtk.x86_64,SUSE Linux Enterprise Server 12 (x86_64)" -output $perfOutput -dataDir ${dataDir} ${current_prefix} -print -vm ${devJRE} -vmargs ${vmargs} #>> ${PERF_OUTFILE} - RC=$? - if [[ $RC != 0 ]] - then - echo "ERROR: eclipse returned non-zero return code from invoking performance.ui app, exiting with RC: $RC." - exit $RC - fi - RAW_DATE_END=$( date -u +%s ) - - #echo -e "\n\tRAW Date End: ${RAW_DATE_END} \n" - echo -e "\n\tEnd Time: $( date +%Y%m%d%H%M%S -d @${RAW_DATE_END} )" #>> ${PERF_OUTFILE} - - ELAPSED_SECONDS=$(( ${RAW_DATE_END} - ${RAW_DATE_START} )) - # echo -e "\n\tDEBUG: RAW_DATE_END: ${RAW_DATE_END} RAW_DATE_START ${RAW_DATE_START} ELAPSED_SECONDS ${ELAPSED_SECONDS}" #>> ${PERF_OUTFILE} - ELAPSED_TIME=$( show_time ${ELAPSED_SECONDS} ) - echo -e "\n\tElapsed Time: ${ELAPSED_TIME}" #>> ${PERF_OUTFILE} -fi - |