From 048d34379706e2f59e7193aa2359524b72bc3a12 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Thu, 24 Jan 2008 21:07:57 +0000 Subject: [PATCH] New releng initial checkin --- releng/org.eclipse.tm.releng/.cvsignore | 1 + releng/org.eclipse.tm.releng/build.xml | 27 ++ releng/org.eclipse.tm.releng/buildAll.xml | 221 ++++++++++++++++ .../builder/doc/build.properties | 24 ++ .../builder/doc/customTargets.xml | 176 +++++++++++++ .../builder/examples/build.properties | 24 ++ .../builder/examples/customTargets.xml | 176 +++++++++++++ .../builder/runtime/build.properties | 24 ++ .../builder/runtime/customTargets.xml | 176 +++++++++++++ .../builder/sdk/build.properties | 24 ++ .../builder/sdk/customTargets.xml | 176 +++++++++++++ .../builder/tests/build.properties | 24 ++ .../configs/local/chkpii_ignore_list.txt | 2 + .../tests/configs/local/customTest.xml | 41 +++ .../tests/configs/local/relengbuildgtk.sh | 235 ++++++++++++++++++ .../tests/configs/local/testing.properties | 46 ++++ .../builder/tests/customTargets.xml | 233 +++++++++++++++++ .../builder/tests/scripts/readme.html | 162 ++++++++++++ .../builder/tests/scripts/test.xml | 87 +++++++ releng/org.eclipse.tm.releng/maps/build.cfg | 1 + releng/org.eclipse.tm.releng/maps/rse.map | 66 +++++ .../promoteToEclipse.rse.properties | 164 ++++++++++++ .../org.eclipse.tm.releng/repoInfo.properties | 7 + .../templateFiles/rse.map.template | 10 + .../templateFiles/testManifest.xml.template | 50 ++++ releng/org.eclipse.tm.releng/testManifest.xml | 59 +++++ 26 files changed, 2236 insertions(+) create mode 100644 releng/org.eclipse.tm.releng/.cvsignore create mode 100644 releng/org.eclipse.tm.releng/build.xml create mode 100644 releng/org.eclipse.tm.releng/buildAll.xml create mode 100644 releng/org.eclipse.tm.releng/builder/doc/build.properties create mode 100644 releng/org.eclipse.tm.releng/builder/doc/customTargets.xml create mode 100644 releng/org.eclipse.tm.releng/builder/examples/build.properties create mode 100644 releng/org.eclipse.tm.releng/builder/examples/customTargets.xml create mode 100644 releng/org.eclipse.tm.releng/builder/runtime/build.properties create mode 100644 releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml create mode 100644 releng/org.eclipse.tm.releng/builder/sdk/build.properties create mode 100644 releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml create mode 100644 releng/org.eclipse.tm.releng/builder/tests/build.properties create mode 100644 releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt create mode 100644 releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml create mode 100644 releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh create mode 100644 releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties create mode 100644 releng/org.eclipse.tm.releng/builder/tests/customTargets.xml create mode 100644 releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html create mode 100644 releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml create mode 100644 releng/org.eclipse.tm.releng/maps/build.cfg create mode 100644 releng/org.eclipse.tm.releng/maps/rse.map create mode 100644 releng/org.eclipse.tm.releng/promoteToEclipse.rse.properties create mode 100644 releng/org.eclipse.tm.releng/repoInfo.properties create mode 100644 releng/org.eclipse.tm.releng/templateFiles/rse.map.template create mode 100644 releng/org.eclipse.tm.releng/templateFiles/testManifest.xml.template create mode 100644 releng/org.eclipse.tm.releng/testManifest.xml diff --git a/releng/org.eclipse.tm.releng/.cvsignore b/releng/org.eclipse.tm.releng/.cvsignore new file mode 100644 index 00000000000..3a4edf690ca --- /dev/null +++ b/releng/org.eclipse.tm.releng/.cvsignore @@ -0,0 +1 @@ +.project diff --git a/releng/org.eclipse.tm.releng/build.xml b/releng/org.eclipse.tm.releng/build.xml new file mode 100644 index 00000000000..1d4767e0566 --- /dev/null +++ b/releng/org.eclipse.tm.releng/build.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/releng/org.eclipse.tm.releng/buildAll.xml b/releng/org.eclipse.tm.releng/buildAll.xml new file mode 100644 index 00000000000..2a3af34c71c --- /dev/null +++ b/releng/org.eclipse.tm.releng/buildAll.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + buildType=${buildType} + + + buildId=${buildId} + + + timestamp=${timestamp} + + + buildLabel=${buildLabel} + + + buildAlias=${buildAlias} + + + forceContextQualifier=${forceContextQualifier} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/doc/build.properties b/releng/org.eclipse.tm.releng/builder/doc/build.properties new file mode 100644 index 00000000000..4de75becca6 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/doc/build.properties @@ -0,0 +1,24 @@ +# TODO: set correct source and target levels here +javacSource=1.4 +javacTarget=1.4 + +buildDirectory=${builder}/../eclipse +buildType=I +buildId=${buildId} +buildLabel=${buildLabel} +timestamp=0000 +collPlace=. +collBase=. +baseLocation= +configs=*,*,* +baseos=linux +basews=gtk +basearch=x86 +bootclasspath=${java.home}/lib/*.jar +javacFailOnError=true +javacVerbose=true +javacDebugInfo=on +zipargs= +archivesFormat = *,*,*-antZip +collectingFolder=eclipse +archivePrefix=eclipse diff --git a/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml b/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml new file mode 100644 index 00000000000..a98d508a85a --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/doc/customTargets.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/examples/build.properties b/releng/org.eclipse.tm.releng/builder/examples/build.properties new file mode 100644 index 00000000000..4de75becca6 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/examples/build.properties @@ -0,0 +1,24 @@ +# TODO: set correct source and target levels here +javacSource=1.4 +javacTarget=1.4 + +buildDirectory=${builder}/../eclipse +buildType=I +buildId=${buildId} +buildLabel=${buildLabel} +timestamp=0000 +collPlace=. +collBase=. +baseLocation= +configs=*,*,* +baseos=linux +basews=gtk +basearch=x86 +bootclasspath=${java.home}/lib/*.jar +javacFailOnError=true +javacVerbose=true +javacDebugInfo=on +zipargs= +archivesFormat = *,*,*-antZip +collectingFolder=eclipse +archivePrefix=eclipse diff --git a/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml b/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml new file mode 100644 index 00000000000..c624e40ddde --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/examples/customTargets.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/runtime/build.properties b/releng/org.eclipse.tm.releng/builder/runtime/build.properties new file mode 100644 index 00000000000..4de75becca6 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/runtime/build.properties @@ -0,0 +1,24 @@ +# TODO: set correct source and target levels here +javacSource=1.4 +javacTarget=1.4 + +buildDirectory=${builder}/../eclipse +buildType=I +buildId=${buildId} +buildLabel=${buildLabel} +timestamp=0000 +collPlace=. +collBase=. +baseLocation= +configs=*,*,* +baseos=linux +basews=gtk +basearch=x86 +bootclasspath=${java.home}/lib/*.jar +javacFailOnError=true +javacVerbose=true +javacDebugInfo=on +zipargs= +archivesFormat = *,*,*-antZip +collectingFolder=eclipse +archivePrefix=eclipse diff --git a/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml b/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml new file mode 100644 index 00000000000..ab53a6332dd --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/runtime/customTargets.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/sdk/build.properties b/releng/org.eclipse.tm.releng/builder/sdk/build.properties new file mode 100644 index 00000000000..4de75becca6 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/sdk/build.properties @@ -0,0 +1,24 @@ +# TODO: set correct source and target levels here +javacSource=1.4 +javacTarget=1.4 + +buildDirectory=${builder}/../eclipse +buildType=I +buildId=${buildId} +buildLabel=${buildLabel} +timestamp=0000 +collPlace=. +collBase=. +baseLocation= +configs=*,*,* +baseos=linux +basews=gtk +basearch=x86 +bootclasspath=${java.home}/lib/*.jar +javacFailOnError=true +javacVerbose=true +javacDebugInfo=on +zipargs= +archivesFormat = *,*,*-antZip +collectingFolder=eclipse +archivePrefix=eclipse diff --git a/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml b/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml new file mode 100644 index 00000000000..a65e7513b56 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/sdk/customTargets.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/tests/build.properties b/releng/org.eclipse.tm.releng/builder/tests/build.properties new file mode 100644 index 00000000000..4de75becca6 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/build.properties @@ -0,0 +1,24 @@ +# TODO: set correct source and target levels here +javacSource=1.4 +javacTarget=1.4 + +buildDirectory=${builder}/../eclipse +buildType=I +buildId=${buildId} +buildLabel=${buildLabel} +timestamp=0000 +collPlace=. +collBase=. +baseLocation= +configs=*,*,* +baseos=linux +basews=gtk +basearch=x86 +bootclasspath=${java.home}/lib/*.jar +javacFailOnError=true +javacVerbose=true +javacDebugInfo=on +zipargs= +archivesFormat = *,*,*-antZip +collectingFolder=eclipse +archivePrefix=eclipse diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt b/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt new file mode 100644 index 00000000000..a4dc1c6c4d9 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/configs/local/chkpii_ignore_list.txt @@ -0,0 +1,2 @@ +references/javadoc/*.html +**/epl-v10.html diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml b/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml new file mode 100644 index 00000000000..f9d4022e7f9 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/configs/local/customTest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh b/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh new file mode 100644 index 00000000000..9e5abf1034d --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/configs/local/relengbuildgtk.sh @@ -0,0 +1,235 @@ +#!/bin/bash + +echo -n "[relengbuild] $0 started on: `date +%Y%m%d\ %H\:%M\:%S`"; + +# environment variables +PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/X11R6/bin:`pwd`/../linux;export PATH + +export USERNAME=`whoami` +echo " running as $USERNAME"; +echo " currently in dir: `pwd`"; + +if [[ ! $JAVA_HOME ]]; then + echo -n "[relengbuild] Get JAVA_HOME from build.cfg ... "; + buildcfg=$PWD/../../../build.cfg; + export JAVA_HOME=$(grep "JAVA_HOME=" $buildcfg | egrep -v "^#" | tail -1 | sed -e "s/JAVAHOME=//"); + echo "$JAVA_HOME"; +fi + +Xflags=""; +Dflags=""; + +# default target to run in org.eclipse.$subprojectName.releng/builder/tests/scripts/test.xml +antTestTarget=all + +# process command line arguments +while [ $# -gt 0 ] +do + case "$1" in + -vmExecutable) vmExecutable="$2"; shift;; + -consolelog) consolelog="$2"; shift;; + -X*) Xflags=$Xflags\ $1;; + -D*) Dflags=$Dflags\ $1;; + esac + shift +done + +checkIfj9 () +{ +# given a series of -X flags, see if the string -Xj9 can be found + j9=$Xflags; + #echo "Xflags=$Xflags" + j9=${j9/\-Xj9/} # substring replacement + #echo "remaining: $j9" + if [ "$j9" != "$Xflags" ]; then # found it + j9="j9"; + else + j9=""; + fi +} +checkIfj9; + +defined=0; +checkIfDefined () +{ + if [ -f $1 ] ; then + defined=1; + else + defined=0; + fi +} + +execCmd () +{ + echo ""; echo "[relengbuild] [`date +%H\:%M\:%S`]"; + echo " $1" | perl -pe "s/ -/\n -/g"; + if [ "x$2" != "x" ]; then + $1 | tee $2; + else + $1; + fi +} + +doFunction () +{ + cmd=$1; + params=$2 + for pth in "." "/bin" "/usr/bin" "/usr/bin/X11" "/usr/local/bin" "/usr/X11R6/bin" "`pwd`/../linux" ; do + defined=0; + checkIfDefined $pth/$cmd + if [ $defined -eq 1 ] ; then + $cmd $params + sleep 3 + break; + fi + done + if [ $defined -eq 0 ] ; then + echo "$cmd is not defined (command not found)"; + fi +} + +# these don't work on old build server, so not point wrapping them to say so when we can just omit +# doFunction Xvfb ":42 -screen 0 1024x768x24 -ac & " +# doFunction Xnest ":43 -display :42 -depth 24 & " +# doFunction fvwm2 "-display localhost:43.0 & " +#export DISPLAY=$HOSTNAME:43.0 +#ulimit -c unlimited + +getBuildID() +{ # given $PWD: /home/www-data/build/dsdp/$projectName/$subprojectName/downloads/drops/1.1.0/N200702112049/testing/N200702112049/testing + # return N200702110400 + buildID=$1; #echo "buildID=$buildID"; + buildID=${buildID##*drops\/}; # trim up to drops/ (from start) (substring notation) + buildID=${buildID%%\/test*}; # trim off /test (to end) (substring notation) + buildID=${buildID##*\/}; # trim up to / (from start) (substring notation) +} +buildID=""; getBuildID $PWD; #echo buildID=$buildID; + +getBranch() +{ # given $PWD: /home/www-data/build/dsdp/$projectName/$subprojectName/downloads/drops/1.1.0/N200702112049/testing/N200702112049/testing + # return 1.1.0 + branch=$1; #echo "branch=$branch"; + branch=${branch##*drops\/}; # trim up to drops/ (from start) (substring notation) + branch=${branch%%\/*}; # trim off / (to end) (substring notation) +} +branch=""; getBranch $PWD; #echo branch=$branch; + +############################# BEGIN RUN TESTS ############################# + + +# operating system, windowing system and architecture variables +# for *nix systems, os, ws and arch values must be specified +Dflags=$Dflags" "-Dplatform=linux.gtk +os=linux +ws=gtk +arch=x86 + +# default value to determine if eclipse should be reinstalled between running of tests +installmode="clean" + +#this value must be set when using rsh to execute this script, otherwise the script will execute from the user's home directory +dir=. +cd $dir +workspaceDir="$dir/eclipse/workspace" + +# Replace the boot eclipse (The eclipse used to run the main test.xml, this will start another eclipse later) +if [ -d $dir/eclipse ] ; then + rm -rf $dir/eclipse +fi +if [ -d $workspaceDir ] ; then + rm -rf $dir/workspace +fi + +echo "[runtests] Currently in `pwd`:" +# need conditional processing here: M3.0.2 = zip, I3.1.0 = tar.gz +sdks=`find $dir -name "eclipse-SDK-*"` +# get extension from file(s) +for sdk in $sdks; do + sdk="eclipse"${sdk##*eclipse}; # trim up to eclipse (substring notation) + #echo -n "[runtests] Eclipse SDK $sdk is a"; + ext=${sdk%%\.zip}; # trim off .zip (substring notation) + if [ "$ext" != "$sdk" ]; then # it's a zip + #echo " zip. Unpacking..."; + unzip -qq -o $sdk + else + ext=${sdk%%\.tar\.gz}; # trim off .tar.gz (substring notation) + if [ "$ext" != "$sdk" ]; then # it's a tar.gz + #echo " tar.gz. Unpacking..."; + tar -xzf $sdk + else + ext=${sdk%%\.tar\.Z}; # trim off .tar.Z (substring notation) + if [ "$ext" != "$sdk" ]; then # it's a tar.Z + #echo " tar.Z. Unpacking..."; + tar -xZf $sdk + else + echo "[runtests] ERROR: Eclipse SDK $sdk is an UNKNOWN file type. Failure."; + exit 2 + fi + fi + fi +done + +J2SE15flags=""; +# TODO: if a 1.5 JDK and want source/target = 1.5, leave these in +# TODO: if source/target = 1.4, remove these! +if [ ${JAVA_HOME##*1.5*}"" = "" -o ${JAVA_HOME##*15*}"" = "" -o ${JAVA_HOME##*5.0*}"" = "" -o ${JAVA_HOME##*50*}"" = "" ]; then + # set J2SE-1.5 properties (-Dflags) + bootclasspath="."`find $JAVA_HOME/jre/lib -name "*.jar" -printf ":%p"`; + J2SE15flags=$J2SE15flags" -DJ2SE-1.5=$bootclasspath" + J2SE15flags=$J2SE15flags" -DbundleBootClasspath=$bootclasspath" + J2SE15flags=$J2SE15flags" -DjavacSource=1.5" + J2SE15flags=$J2SE15flags" -DjavacTarget=1.5" + J2SE15flags=$J2SE15flags" -DbundleJavacSource=1.5" + J2SE15flags=$J2SE15flags" -DbundleJavacTarget=1.5" +fi + +# different ways to get the launcher and Main class +if [[ -f eclipse/startup.jar ]]; then + cpAndMain="eclipse/startup.jar org.eclipse.core.launcher.Main"; # up to M4_33 +elif [[ -f eclipse/plugins/org.eclipse.equinox.launcher.jar ]]; then + cpAndMain="eclipse/plugins/org.eclipse.equinox.launcher.jar org.eclipse.equinox.launcher.Main"; # M5_33 +else + cpAndMain=`find eclipse/ -name "org.eclipse.equinox.launcher_*.jar" | sort | head -1`" org.eclipse.equinox.launcher.Main"; +fi + +# run tests +echo "[runtests] [`date +%H\:%M\:%S`] Launching Eclipse (installmode = $installmode with -enableassertions turned on) ..." +execCmd "$JAVA_HOME/bin/java $Xflags -enableassertions -cp $cpAndMain -ws $ws -os $os -arch $arch \ +-application org.eclipse.ant.core.antRunner -data $workspaceDir -file test.xml $antTestTarget \ +$Dflags -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $J2SE15flags \ +$properties -logger org.apache.tools.ant.DefaultLogger" $consolelog; +echo "[runtests] [`date +%H\:%M\:%S`] Eclipse test run completed. " + +############################# END RUN TESTS ############################# + +# supress errors by checking for the file first +if [ -r /tmp/.X43-lock ] ; then + kill `cat /tmp/.X43-lock` +fi +if [ -r /tmp/.X42-lock ] ; then + kill `cat /tmp/.X42-lock` +fi + +if [[ ! -d $PWD/results ]]; then + echo "[relengbuild] No test results found in $PWD/results!"; + echo "[relengbuild] Creating 'noclean' file to prevent cleanup after build completes." + echo "1" > $PWD/../../../noclean; +else +# if the build failed for some reason, don't clean up! +xmls=`find $PWD/results/xml -name "*.xml"`; +testsFailed=1; +for xml in $xmls; do + if [ $testsFailed -eq 1 ]; then + testsFailed=`cat $xml | grep -c " $PWD/../../../noclean; + break; + fi + fi +done +fi; + +echo "[relengbuild] relengbuildgtk.sh completed on: `date +%Y%m%d\ %H\:%M\:%S`" + diff --git a/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties b/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties new file mode 100644 index 00000000000..155bc706619 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/configs/local/testing.properties @@ -0,0 +1,46 @@ +#which (sub)project? +project=rse + +#target to call in test.xml: runtests-local | runtests-remote +testTarget=runtests-local + +#directory on test machine where automated testing framework will be installed +testDir=${testBase}/${buildLabel} + +#name of zip file containing automated testing framework and JUnit test plug-ins +testFramework=RSE-automated-tests-${buildAlias}.zip + +#directory where test scripts are launched +executionDir=${testDir}/testing + +#name of runtime to install and test +runtime=RSE-SDK-${buildAlias}.zip + +# leave this blank and it will be generated by genBuildDetails.sh +javaHome=%%JAVA_HOME%% +vmExecutable=${javaHome}/bin/java + +#hack to override unneeded function in releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml +vmUrl= +vmDest=/dev/null +vmInstallExecutable=${vmExecutable} +vmInstallCommand=-version + +#eclipse platforms: win32 | linux.motif | linux.gtk | aix.motif | hpux.motif |solaris.motif +platform=${baseos}.${basews} + +#name of file that captures console output from running JUnit plug-in tests +consolelog=${baseos}.${basews}_consolelog.txt + +#Works with IBM and Sun JDKs, 1.4+ +#name of script to execute +testExecutable=bash + +#arguments to $(testExecutable) - .sh script + args +args=${executionDir}/${shell} -vmExecutable ${vmExecutable} -consolelog ${consolelog} ${Xflags} ${Dflags} + +#TODO: set vm-specific flags +#Xflags=-Xms64M -Xmx192M +Xflags=-Xms256M -Xmx256M +Dflags= + diff --git a/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml b/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml new file mode 100644 index 00000000000..af1387e781b --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/customTargets.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html b/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html new file mode 100644 index 00000000000..628cbca98eb --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/scripts/readme.html @@ -0,0 +1,162 @@ + + +Instructions + + + + + Automated Testing of DSDP Project Builds +

last updated: November 9, 2005

+

Description

+

This document describes how to run the your project's JUnit test plugins from the command + line. This is the same mechanism used in the builds.

+

Click here for a description of the testing + framework, and how it can be used outside of the setup described here.

+

If you simply wish to write and run JUnit tests interactively from an Eclipse + workbench, try one of the links below:

+

JUnit + Support in Eclipse
+Using + JUnit

+ +

Requirements

+

1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see + -vm parameter below).
+ 2. Info-ZIP UnZip + version 5.41 or later installed and added to the path.
+ 3. The Automated Test feature from a + downloads. + This contains the test framework plugins and the JUnit test plugins to run.
+ 4. The zip file from the same build as the Automated Test feature. You can use the RSE-*-SDK zip file instead of the individual files.
+ 5. An Eclipse SDK zip file. The URL and build name of the required builds + are specified in the build.cfg file included in the Automated Test zip file.

+

Setup

+

1. Extract the RSE-*-automated-tests-<buildid>.zip. On Window, extract + this file close to the root of the drive to prevent some path names from exceeding + the 255 character limit. This will create a top-level directory "testing".
+ 2. Place the Eclipse SDK zip file and the project's runtime in the testing directory. + Do not unzip these files. (The test scripts will take care of this)
+

+

Running Tests

+

1. cd to the testing directory
+ 2. Run the following script:

+

runtests.sh [-os <operating system>] [-ws <windowing system>] [-arch + <architecture>] [-noclean] [<testTarget>][-properties <path>][-vm + <path to java executable>]

+All parameters and targets are optional on windows systems. Just running "runtests.sh" +will run ALL tests on Windows, installing a clean Eclipse and your project's SDK between +each test target. On *nix systems, the os, ws and arch parameters must be specified. +
+
+Test results are placed in the testing/results directory in xml and html format.
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDescription
-os <operating system>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris, + win32. Default win32
-ws <windowing system>The windowing system the tests are being run on. One of: motif, gtk, photon, + win32. Default win32
-arch <architecture>The architecture the tests are being run on. One of: ppc, PA_RISC, x86, + sparc. Default x86
-nocleanRun tests without installing an Eclipse and GEF SDK and tests between + test targets. Default is to re-install these between test targets.
-propertiesUsed to reference a properties file containing additional Ant properties + used in running tests.Can be used to pass additional vm arguments to the + Java virtual machine running the tests by adding the entry "extraVMargs=<the + args to pass to the vm>" to the specified properties file.
-vmThe full path to the java executable with which to run the tests. Use + this to specify a specific virtual machine with which to run the tests. + For example, "-vm c:\sun131\jre\bin\java". Default set to "java" + (i.e. java executable on system path).
+ +

Test Targets

+

Specifies which ant target to run in the main test.xml. Typically this corresponds + to a test project's tests. If you do not specify a test target then the all + test target is run.

+ + + + + + + + + + + + + + +
allRuns all the targets below.
rseRuns the JUnit tests located in the test plug-ins
genHtmlConverts xml test results in the "testing/results" directory + to html.
+

 

+

Appendix A- Supported os, ws, and arch + value combinations

+

The following table contains the values that can be used with the -os, -ws, + and -arch switches.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Operating System (os)Windowing System (ws)Architecture (arch)
aixmotifppc
hpuxmotifPA_RISC
linuxgtkx86
linuxmotifx86
qnxphotonx86
solarismotifsparc
win32win32x86
+ + diff --git a/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml b/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml new file mode 100644 index 00000000000..1d252548581 --- /dev/null +++ b/releng/org.eclipse.tm.releng/builder/tests/scripts/test.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +