diff options
author | David Williams | 2016-04-29 19:26:21 +0000 |
---|---|---|
committer | David Williams | 2016-04-29 19:26:21 +0000 |
commit | 1823e4acb9abb4b673bead2a06a260f25a5b546d (patch) | |
tree | db3cc762c06a77c7974ff52328d6c3a15dfb833b /production | |
parent | 490cfaa695cd282350ae23c8e670d3e125eca68e (diff) | |
download | eclipse.platform.releng.aggregator-1823e4acb9abb4b673bead2a06a260f25a5b546d.tar.gz eclipse.platform.releng.aggregator-1823e4acb9abb4b673bead2a06a260f25a5b546d.tar.xz eclipse.platform.releng.aggregator-1823e4acb9abb4b673bead2a06a260f25a5b546d.zip |
Bug 492580 - deltapack can not be created by test, on Linux.
Diffstat (limited to 'production')
-rw-r--r-- | production/build_eclipse_org.shsource | 5 | ||||
-rwxr-xr-x | production/testScripts/configuration/sdk.tests/testScripts/runtests.sh | 101 | ||||
-rw-r--r-- | production/testScripts/getBaseBuilder.xml | 226 | ||||
-rwxr-xr-x | production/testScripts/hudsonBootstrap/getEBuilder.sh | 4 | ||||
-rw-r--r-- | production/testScripts/hudsonBootstrap/getEBuilder.xml | 5 | ||||
-rwxr-xr-x | production/testScripts/test_runTests2.xml.sh | 2 |
6 files changed, 64 insertions, 279 deletions
diff --git a/production/build_eclipse_org.shsource b/production/build_eclipse_org.shsource index 5919f89e9..28b545d2e 100644 --- a/production/build_eclipse_org.shsource +++ b/production/build_eclipse_org.shsource @@ -65,8 +65,9 @@ export MAVEN_PATH=${MAVEN_PATH:-/shared/common/apache-maven-3.3.3/bin} export PATH=$JAVA_HOME/bin:$MAVEN_PATH:$ANT_HOME/bin:$PATH -# Only used to start antrunner for tests. May not need here? -BASEBUILDER_TAG=R38M6PlusRC3G +# Only used to start antrunner for tests. +# TODO: avoid this hard coding +BASEBUILDER_TAG=4.5.2 B_GIT_EMAIL=e4Build@eclipse.org B_GIT_NAME="E4 Build" diff --git a/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh b/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh index f1c388fd5..f79f98643 100755 --- a/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh +++ b/production/testScripts/configuration/sdk.tests/testScripts/runtests.sh @@ -13,43 +13,48 @@ export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:~/bin source localBuildProperties.shsource 2>/dev/null -# should already be defined, by now, in production tests -export jvm=${jvm:-/shared/common/jdk-1.6.x86_64/jre/bin/java} -echo "jvm: $jvm" +# 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}" -o ! -e ${jvm} ] +if [[ -z "${jvm}" || ! -x ${jvm} ]] then - echo "No JVM define, or the defined one was found to not be executable" - echo " jvm: $jvm" + echo "ERROR: No JVM define, or the defined one was found to not be executable" exit 1 fi +echo "jvm: $jvm" -stableEclipseSDK=${stableEclipseSDK:-eclipse-SDK-4.5.2-linux-gtk-x86_64.tar.gz} -stableEclipseInstallLocation=${stableEclipseInstallLocation:-${WORKSPACE}/org.eclipse.releng.basebuilder} +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}. -# Note: for production tests, we use ${WORKSPACE}/org.eclipse.releng.basebuilder, -# for historical reasons. The "true" (old) basebuilder does not have an 'eclipse' directory; -# plugins is directly under org.eclipse.releng.basebuilder. -if [ ! -r ${stableEclipseInstallLocation} ] +# A previous step should have already put the tar or zip file for binary platform there. +if [[ ! -r ${stableEclipseInstallLocation} ]] then - mkdir stableEclipseSDK - tar -xf ${stableEclipseSDK} -C ${stableEclipseInstallLocation} - # note, the file pattern to match, must not start with */plugins because there is no leading '/' in the zip file, since they are repos. - #We no longer use "dropins" for tests! test.xml will "install" them, from "test repo" - #unzip -qq -o -C eclipse-junit-tests-*.zip plugins/org.eclipse.test* -d eclipse/dropins/ + 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.5.2-linux-gtk-x86_64.tar.gz + # so for simplicity, we'll assume all is well and untar what ever we find. + tar -xf ${stableEclipseInstallLocation}/*tar.gz -C ${stableEclipseInstallLocation} fi launcher=$(find ${stableEclipseInstallLocation} -name "org.eclipse.equinox.launcher_*.jar" ) -echo "launcher: $launcher" if [ -z "${launcher}" ] then - echo "launcher not found in ${stableEclipseInstallLocation}" + echo "ERROR: launcher not found in ${stableEclipseInstallLocation}" exit 1 fi +echo "launcher: $launcher" # define, but null out variables we expect on the command line @@ -96,7 +101,7 @@ do -vm) jvm="${2}"; shift;; *) - tests=$tests\ ${1};; + tests="$tests\ ${1}";; esac shift done @@ -106,37 +111,43 @@ 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" ] +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" - exit 1 +else + platformArgString="" + platformParmString="" + platformString="" + if [[ -n "${os}" ]] + then + platformArgString="${platformArgString} -Dosgi.os=$os" + platformParmString="${platformParmString} -Dos=$os" + platformString="${platformString}${os}" fi - -if [ "x$ws" = "x" ] + if [[ -n "${ws}" ]] then - echo >&2 "$usage" - exit 1 + platformArgString="${platformArgString} -Dosgi.ws=$ws" + platformParmString="${platformParmString} -Dws=$ws" + platformString="${platformString}_${ws}" fi - -if [ "x$arch" = "x" ] + if [[ -n "${arch}" ]] then - echo >&2 "$usage" - exit 1 + platformArgString="${platformArgString} -Dosgi.arch=$arch" + platformParmString="${platformParmString} -Darch=$arch" + platformString="${platformString}_${arch}" +fi fi # run tests -#echo " = = = Start list environment variables in effect = = = =" +#### 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 = = = =" - -# TODO: consider moving all this to 'testAll.sh'. (If testAll.sh stays around) -# make sure there is a window manager running. See bug 379026 -# we should not have to, but may be a quirk/bug of hudson setup -# assuming metacity attaches to "current" display by default (which should have -# already been set by Hudson). We echo its value here just for extra reference/cross-checks. +#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 @@ -177,7 +188,6 @@ else fi fi - echo # list out metacity processes so overtime we can see if they accumulate, or if killed automatically @@ -191,16 +201,23 @@ wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|i 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 - $jvm ${ANT_OPTS} "${extdirproperty}" -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml ${ANT_OPTS} -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger $tests + 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 - $jvm ${ANT_OPTS} -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml ${ANT_OPTS} -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger $tests + 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/getBaseBuilder.xml b/production/testScripts/getBaseBuilder.xml deleted file mode 100644 index d51d413b5..000000000 --- a/production/testScripts/getBaseBuilder.xml +++ /dev/null @@ -1,226 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - <!-- - A utility ant script get the base builder from CVS. - Hudson jobs can call this script from ant - as one of it first build steps. - --> -<project - name="getBaseBuilder" - default="getBaseBuilder" - basedir="."> - - <target - name="init" - depends="initWorkspace" - unless="getBaseBuilderInitialized"> - - <property environment="env" /> - - <!-- - TODO: eventually should be previousReleaseVersion - which requires "initStreamVariables" - --> - <property - name="baseBuilderVersion" - value="R38M6PlusRC3G" /> - <!-- eventually we will not have a hard coded version --> - <fail - unless="baseBuilderVersion" - message="This script needs baseBuilderVersion to run" /> - - -<!-- - The desired folder name (made to stay consistent - old versions ... may want to make more meaningful, - eventually. ---> - <property - name="basebuilderFolderName" - value="org.eclipse.releng.basebuilder" /> - - <!-- if not set directly by caller, see if it is an - environment variable. If set, is it expected to be - the patch to use to find the local, pre-cached version. - --> - <condition - property="basebuilderlocal" - value="${env.BASEBUILDER_LOCAL}"> - <isset property="env.BASEBUILDER_LOCAL" /> - </condition> - - <!-- just for better log messages --> - <condition - property="fetchSource" - value="Fetching from git via CGit, since not local" - else="Using local pre-cached version in ${basebuilderlocal}"> - <not> - <isset property="basebuilderlocal" /> - </not> - </condition> - - <echo message="=== Properties in init, of getBaseBuilder.xml" /> - <echo message=" WORKSPACE: ${WORKSPACE}" /> - <echo message=" basebuilder version: ${baseBuilderVersion}" /> - <echo message=" copied to folder: ${basebuilderFolderName}" /> - <echo message=" fetchSource: ${fetchSource}" /> - <echo message=" skipBaseBuilder ${skipBaseBuilder}" /> - - <!-- not used? But, may want in future? - <condition - property="buildcleanarg" - value="-Dbuild.clean=${build.clean}" - else=""> - <isset property="build.clean" /> - </condition> - - <condition - property="buildercleanarg" - value="-Dcheckout.builder.clean=${checkout.builder.clean}" - else=""> - <isset property="checkout.builder.clean" /> - </condition> - --> - <property - name="getBaseBuilderInitialized" - value="true" /> - </target> - - - <target - name="getBaseBuilder" - depends="init, fetchBaseBuilder" - unless="skipBaseBuilder"> - - <fail - unless="basebuilderfetched" - message="Failed to get base builder" /> - </target> - - <target - name="checkIfNeeded" - depends="init"> - <!-- - At this point, specific to the "fall back" of getting from - git, there are two reasons it may no longer be needed. Either the - first task, the local fetch, got it, or else the user - specified skipBaseBuilder, presumably because they already have it, - and they do not need a clean copy. - --> - <condition property="notNeeded"> - <or> - <istrue value="${skipBaseBuilder}" /> - <istrue value="${basebuilderfetched}" /> - </or> - </condition> - - </target> - - <!-- getting from Git is always the fall back --> - <target - name="fetchBaseBuilderFromGit" - depends="init, checkIfNeeded" - unless="notNeeded"> - <echo message="Fetching basebuilder from Git via CGit" /> - - <!-- - remove old one, if there, and make sure one exists - for eventual checkout/copy/globmapper. - Eventually will want to change this, so if already exists, - then assume we are done? - --> - <delete dir="${WORKSPACE}/${basebuilderFolderName}" /> - <mkdir dir="${WORKSPACE}/${basebuilderFolderName}" /> - <get - src="http://git.eclipse.org/c/platform/eclipse.platform.releng.basebuilder.git/snapshot/eclipse.platform.releng.basebuilder-${baseBuilderVersion}.zip" - dest="${WORKSPACE}/basebuilder-${baseBuilderVersion}.zip" /> - <unzip - src="${WORKSPACE}/basebuilder-${baseBuilderVersion}.zip" - dest="${WORKSPACE}" - overwrite="true" /> - - <move todir="${WORKSPACE}/${basebuilderFolderName}"> - <fileset dir="${WORKSPACE}/eclipse.platform.releng.basebuilder-${baseBuilderVersion}"> - <include name="**/*" /> - </fileset> - </move> - - <chmod perm="ugo+x"> - <fileset dir="${WORKSPACE}/${basebuilderFolderName}"> - <include name="eclipse" /> - <include name="*.so*" /> - </fileset> - </chmod> - - <!-- we've moved the files, now to remove the empty dir --> - <delete - includeemptydirs="true"> - <dirset dir="${WORKSPACE}"> - <include name="eclipse.platform.releng.basebuilder-${baseBuilderVersion}" /> - </dirset> - </delete> - - <!-- cleanup (may eventually want to "cache" this zip file, so no need to re-fetch if already exists --> - <delete file="${WORKSPACE}/basebuilder-${baseBuilderVersion}.zip" /> - - <property - name="basebuilderfetched" - value="true" /> - </target> - - - <target - name="fetchBaseBuilder" - depends="init, fetchBaseBuilderLocal, fetchBaseBuilderFromGit" - unless="skipBaseBuilder"> - <echo message="Fetched basebuilder to ${WORKSPACE}/${basebuilderFolderName}" /> - </target> - <target - name="fetchBaseBuilderLocal" - depends="init" - if="basebuilderlocal" - unless="skipBaseBuilder"> - - <!-- - remove old one, if there, and make sure one exists - for eventual checkout/copy/globmapper. - Eventually will want to change this, so if already exists, - then assume we are done? - --> - <delete dir="${WORKSPACE}/${basebuilderFolderName}" /> - <mkdir dir="${WORKSPACE}/${basebuilderFolderName}" /> - - <unzip - src="${basebuilderlocal}/basebuilder-${baseBuilderVersion}.zip" - dest="${WORKSPACE}" - overwrite="true" /> - - <move todir="${WORKSPACE}/${basebuilderFolderName}"> - <fileset dir="${WORKSPACE}/eclipse.platform.releng.basebuilder-${baseBuilderVersion}"> - <include name="**/*" /> - </fileset> - </move> - - <chmod perm="ugo+x"> - <fileset dir="${WORKSPACE}/${basebuilderFolderName}"> - <include name="eclipse" /> - <include name="*.so*" /> - </fileset> - </chmod> - <echo message="Copied basebuilder to ${WORKSPACE}/${basebuilderFolderName}" /> - <property - name="basebuilderfetched" - value="true" /> - - </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/hudsonBootstrap/getEBuilder.sh b/production/testScripts/hudsonBootstrap/getEBuilder.sh index 5d6a3863d..616ed875f 100755 --- a/production/testScripts/hudsonBootstrap/getEBuilder.sh +++ b/production/testScripts/hudsonBootstrap/getEBuilder.sh @@ -44,10 +44,6 @@ then exit $rccode fi -# copy to well-known location so subsequent steps do not need to know which ebuilder they came from -#cp ${WORKSPACE}/${EBUILDER}/eclipse.platform.releng.tychoeclipsebuilder/eclipse/getBaseBuilder.xml ${WORKSPACE} -#cp ${WORKSPACE}/${ESCRIPT_LOC}/runTests2.xml ${WORKSPACE} - # remove on clean exit, if they exist if [[ -f ebuilder.zip ]] then diff --git a/production/testScripts/hudsonBootstrap/getEBuilder.xml b/production/testScripts/hudsonBootstrap/getEBuilder.xml index 3b10e7936..af5a625ba 100644 --- a/production/testScripts/hudsonBootstrap/getEBuilder.xml +++ b/production/testScripts/hudsonBootstrap/getEBuilder.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - A utility ant script get the eclipse builder from Git, either old one used with - our PDE builds, or new one used with CBI builds. It includes copying getBaseBuilder.xml - and runTest2.xml to root of workspace, where subsequent Hudson build steps can easily use them. + 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 '-', @@ -99,7 +97,6 @@ <antcall target="fetchEBuilder" /> <antcall target="EBuildercleanup" /> - <ant antfile="${WORKSPACE}/${eScriptLocation}/getBaseBuilder.xml" /> <ant antfile="${WORKSPACE}/${eScriptLocation}/runTests2.xml" /> </target> diff --git a/production/testScripts/test_runTests2.xml.sh b/production/testScripts/test_runTests2.xml.sh index 3222d6a1d..b3c07b4a0 100755 --- a/production/testScripts/test_runTests2.xml.sh +++ b/production/testScripts/test_runTests2.xml.sh @@ -25,7 +25,7 @@ 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 eclipse.platform.releng.basebuilder-R38M6PlusRC3G/ getEBuilder.xml org.eclipse.releng.basebuilder/ runTests2.xml tempEBuilder/ + 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 |