diff options
author | David Williams | 2015-10-01 20:28:45 +0000 |
---|---|---|
committer | David Williams | 2015-10-01 20:28:45 +0000 |
commit | 328e4d3bf83d216ae5c2779f027359bff33feaca (patch) | |
tree | d52440ede98dd0199b15e2be97907da7973fef4d | |
parent | 180795b3b0f92ac8523974b75d501e3f0fb0d61e (diff) | |
download | eclipse.platform.releng.aggregator-328e4d3bf83d216ae5c2779f027359bff33feaca.tar.gz eclipse.platform.releng.aggregator-328e4d3bf83d216ae5c2779f027359bff33feaca.tar.xz eclipse.platform.releng.aggregator-328e4d3bf83d216ae5c2779f027359bff33feaca.zip |
Bug 477632 - Performance builds have not been running on 4.6 I-builds
-rwxr-xr-x | production/sdk/promotion/startTests.sh | 69 | ||||
-rw-r--r-- | production/testScripts/invokeTestsJSON.xml | 108 | ||||
-rwxr-xr-x | production/testScripts/startTests.sh | 1 |
3 files changed, 130 insertions, 48 deletions
diff --git a/production/sdk/promotion/startTests.sh b/production/sdk/promotion/startTests.sh index cdff5d5fc..6a77af887 100755 --- a/production/sdk/promotion/startTests.sh +++ b/production/sdk/promotion/startTests.sh @@ -1,9 +1,14 @@ #!/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 <sript> to work in invokeTestsJSON +# 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.2 function usage () @@ -16,6 +21,37 @@ function usage () 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 @@ -65,7 +101,6 @@ else exit 1 fi -source localBuildProperties.shsource 2>/dev/null echo "values in ${0}" echo "eclipseStream: $eclipseStream" @@ -75,29 +110,23 @@ echo "eclipseStreamService: $eclipseStreamService" echo "buildType: $buildType" echo "buildId: $buildId" echo "EBUILDER_HASH: $EBUILDER_HASH" +echo "BUILD_HOME: ${BUILD_HOME}" -buildRoot=/shared/eclipse/eclipse${eclipseStreamMajor}${buildType} -buildDir=${buildRoot}/build -supportDir=${buildDir}/supportDir -eclipsebuilder=org.eclipse.releng.eclipsebuilder -builderDir=${supportDir}/$eclipsebuilder + 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}" -# should buildDirectory be set at "main" one from actual build? -buildDirectory=${supportDir}/src - -# note, to be consistent, I changed json xml file so it adds buildId to postingDirectory -siteDir=${buildRoot}/siteDir -postingDirectory=${siteDir}/eclipse/downloads/drops -if (( "${eclipseStreamMajor}" > 3 )) -then - postingDirectory=${siteDir}/eclipse/downloads/drops${eclipseStreamMajor} -fi +echo "DEBUG: invoking test scripts on Hudson" HUDSON_TOKEN=windows2012tests ant \ - -DbuildDirectory=${buildDirectory} \ - -DpostingDirectory=${postingDirectory} \ + -DpostingDirectory=${$buildDropDir} \ -DbuildId=${buildId} \ -DeclipseStream=${eclipseStream} \ -DEBUILDER_HASH=${EBUILDER_HASH} \ - -f ${builderDir}/invokeTestsJSON.xml + -f ${builderDropDir}/invokeTestsJSON.xml diff --git a/production/testScripts/invokeTestsJSON.xml b/production/testScripts/invokeTestsJSON.xml index eb006f344..04a0b00ea 100644 --- a/production/testScripts/invokeTestsJSON.xml +++ b/production/testScripts/invokeTestsJSON.xml @@ -47,27 +47,24 @@ for greater flexibility in what to test?) --> - <parallel> - - <antcall target="triggerHudsonTests"> - <param - name="job" - value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-lin64" /> - </antcall> + <antcall target="triggerHudsonTests"> + <param + name="job" + value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-win32" /> + </antcall> - <antcall target="triggerHudsonTests"> - <param - name="job" - value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-win32" /> - </antcall> + <antcall target="triggerHudsonTests"> + <param + name="job" + value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-lin64" /> + </antcall> - <antcall target="triggerHudsonTests"> - <param - name="job" - value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-mac64" /> - </antcall> + <antcall target="triggerHudsonTests"> + <param + name="job" + value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-mac64" /> + </antcall> - </parallel> </target> <target name="PerfTests" @@ -80,8 +77,6 @@ for greater flexibility in what to test? --> - <parallel> - <antcall target="triggerHudsonPerfTests"> <param name="job" @@ -100,7 +95,7 @@ value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-mac64" /> </antcall> --> - </parallel> + </target> @@ -141,20 +136,55 @@ <echo message="env.HUDSON_PORT: ${env.HUDSON_PORT}" /> <echo message="env.HUDSON_ROOT_URI: ${env.HUDSON_ROOT_URI}" /> <echo message="json for unit curl post: ${json}" /> + <echo message="job: ${job}" /> <exec executable="curl" - resultproperty="unitCurlRCcode"> + resultproperty="rcUnit"> <arg line="-X POST" /> <arg value="${env.HUDSON_PROTOCOL}://${env.HUDSON_HOST}:${env.HUDSON_PORT}/${env.HUDSON_ROOT_URI}/job/${job}/build" /> <arg line="-d token=${env.HUDSON_TOKEN}" /> + <arg value="--fail" /> <arg value="--data-urlencode" /> <arg value="json=${json}" /> </exec> + <echo message="DEBUG: rcUnit: ${rcUnit}" /> + <condition property="invocationNotOk"> + <not> + <equals + arg1="${rcUnit}" + arg2="0" /> + </not> + </condition> + <antcall target="checkInvocation"> + <param + name="returnCode" + value="${rcUnit}" /> + <param + name="job" + value="${job}" /> + </antcall> + </target> - <echo message="unitCurlRCcode: ${unitCurlRCcode}" /> - + <target + name="checkInvocation" + if="invocationNotOk"> + <echo + message="Invocation of Curl did not return 0 return code for ${job}.${line.separator}" + file="${postingDirectory}/TEST_INVOCATION_FAILED" + append="true" /> + <echo + message=" return code was ${returnCode}${line.separator}" + file="${postingDirectory}/TEST_INVOCATION_FAILED" + append="true" /> + <echo + message=" Likely due to Hudson job not being defined (or, possibly network issues).${line.separator}${line.separator}" + file="${postingDirectory}/TEST_INVOCATION_FAILED" + append="true" /> + <!-- We don't want to fail automatically here, since just one machine may be "offline". --> + <echo message="Curl invocation failed. See ${postingDirectory}/TEST_INVOCATION_FAILED${line.separator}" /> </target> + <target name="triggerHudsonPerfTests" depends="init"> @@ -201,25 +231,47 @@ <exec executable="curl" - resultproperty="perfCurlRCcode"> + resultproperty="rcPerf"> <arg line="-X POST" /> <arg value="${env.HUDSON_PERF_PROTOCOL}://${env.HUDSON_PERF_HOST}:${env.HUDSON_PERF_PORT}/${env.LINUX_PERF_SEGMENT}/job/${job}/build" /> <arg line="-d token=${env.HUDSON_TOKEN}" /> + <arg value="--fail" /> <arg value="--data-urlencode" /> <arg value="json=${json}" /> </exec> - - <echo message="perfCurlRCcode: ${perfCurlRCcode}" /> - + <echo message="DEBUG: rcPerf: ${rcPerf}" /> + <condition property="invocationNotOk"> + <not> + <equals + arg1="${rcPerf}" + arg2="0" /> + </not> + </condition> + <antcall target="checkInvocation"> + <param + name="returnCode" + value="${rcPerf}" /> + <param + name="job" + value="${job}" /> + </antcall> </target> + <target name="init" depends="initStreamVariables" unless="invokeTestsJSONinitialized"> <property environment="env" /> + + <!-- posting directory should be passed in to us ... but, in case not + we will at least define it. + --> + <property + name="postingDirectory" + value="${basedir}/postingDirectory" /> <property name="env.HUDSON_HOST" diff --git a/production/testScripts/startTests.sh b/production/testScripts/startTests.sh index 21b1b83bd..417aebfbf 100755 --- a/production/testScripts/startTests.sh +++ b/production/testScripts/startTests.sh @@ -126,6 +126,7 @@ echo "BUILD_HOME: ${BUILD_HOME}" echo "DEBUG: invoking test scripts on Hudson" HUDSON_TOKEN=windows2012tests ant \ + -DpostingDirectory=${$buildDropDir} \ -DbuildId=${buildId} \ -DeclipseStream=${eclipseStream} \ -DEBUILDER_HASH=${EBUILDER_HASH} \ |