Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests')
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/build.properties.jet35
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/chkpii_ignore_list.txt.jet5
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/customTest.xml.jet44
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/relengbuildgtk.sh.jet238
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/testing.properties.jet49
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/customTargets.xml.jet236
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/readme.html.jet165
-rw-r--r--examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/test.xml.jet90
8 files changed, 0 insertions, 862 deletions
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/build.properties.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/build.properties.jet
deleted file mode 100644
index 05dbb0e..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/build.properties.jet
+++ /dev/null
@@ -1,35 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-<c:choose>
-<c:when test="$build/@jre = 'J2SE-1.5'">
-javacSource=5.0
-javacTarget=5.0
-</c:when>
-<c:when test="$build/@jre = 'J2SE-1.4'">
-javacSource=1.4
-javacTarget=1.4
-</c:when>
-</c:choose>
-
-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
-generateFeatureVersionSuffix=true
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/chkpii_ignore_list.txt.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/chkpii_ignore_list.txt.jet
deleted file mode 100644
index 20a9d96..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/chkpii_ignore_list.txt.jet
+++ /dev/null
@@ -1,5 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-references/javadoc/*.html
-**/epl-v10.html
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/customTest.xml.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/customTest.xml.jet
deleted file mode 100644
index 29d0108..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/customTest.xml.jet
+++ /dev/null
@@ -1,44 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-<project name="Customized testing instructions" default="customSetup">
-
- <property name="buildConfigFile" value="${testDir}/../../build.cfg" />
- <available file="${buildConfigFile}" type="file" property="buildConfigIsAvailable" />
-
- <target name="loadbuildConfig" if="buildConfigIsAvailable">
- <property file="${buildConfigFile}" />
- </target>
-
- <target name="customSetup">
- <fail unless="buildConfigIsAvailable" message="ERROR! Can't find ${buildConfigFile}"/>
- <antcall target="loadbuildConfig"/>
-
- <echo message="Unpack Eclipse SDK to ${testDir}..."/>
- <echo message="customTest.xml: basedir = ${basedir}"/>
- <property name="getTestDependencies.xml" value="${testDir}/../../org.eclipse.modeling.common.releng/scripts/getTestDependencies.xml"/>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}">
- <property name="basedir" value="${basedir}"/>
- <property name="url" value="${eclipseURL}"/>
- <property name="file" value="${eclipseFile}"/>
- <property name="unpackDest" value="${testDir}"/>
- </ant>
-
- <!-- TODO: if your project requires more dependencies for testing, add them here -->
- <echo message="Copy EMF SDK + Eclipse SDK to ${executionDir}..."/>
- <copy todir="${executionDir}">
- <fileset dir="${downloadsDir}" includes="${emfFile},${eclipseFile}"/>
- </copy>
- <property name="shell" value="relengbuildgtk.sh"/>
-
- <!--copy the script which invokes the tests -->
- <copy file="${tester}/${shell}" todir="${executionDir}"/>
- <chmod file="${executionDir}/${shell}" perm="ugo+rx"/>
-
- <!--copy the testing.property files -->
- <copy file="${tester}/testing.properties" todir="${executionDir}"/>
-
- <!-- at this point, we exit from this script and back into the parent script (presumably in pde or eclipse.releng?) -->
- <echo message="Running ${shell} ..."/>
- </target>
-</project>
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/relengbuildgtk.sh.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/relengbuildgtk.sh.jet
deleted file mode 100644
index 23b7b92..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/relengbuildgtk.sh.jet
+++ /dev/null
@@ -1,238 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-#!/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/modeling/$buildName/$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/modeling/$buildName/$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 "<testsuite errors=\"0\" failures=\"0\""`
- if [ $testsFailed -lt 1 ]; then
- echo "[relengbuild] Found test failure(s) in $xml!";
- echo "[relengbuild] Creating 'noclean' file to prevent cleanup after build completes."
- echo "1" > $PWD/../../../noclean;
- break;
- fi
- fi
-done
-fi;
-
-echo "[relengbuild] relengbuildgtk.sh completed on: `date +%Y%m%d\ %H\:%M\:%S`"
-
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/testing.properties.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/testing.properties.jet
deleted file mode 100644
index 2075c1a..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/configs/local/testing.properties.jet
+++ /dev/null
@@ -1,49 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-#which (sub)project?
-project=<c:get select="$build/@shortName"/>
-
-#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=<c:get select="$build/@parentProjectName"/>-${project}-automated-tests-<c:get select="$build/@incubationTag"/>${buildAlias}.zip
-
-#directory where test scripts are launched
-executionDir=${testDir}/testing
-
-#name of runtime to install and test
-runtime=<c:get select="$build/@parentProjectName"/>-${project}-SDK-<c:get select="$build/@incubationTag"/>${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/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/customTargets.xml.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/customTargets.xml.jet
deleted file mode 100644
index ebc4c72..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/customTargets.xml.jet
+++ /dev/null
@@ -1,236 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-<project name="Build specific targets and properties" default="noDefault" basedir=".">
-
-<!-- ===================================================================== -->
-<!-- Run a given ${target} on all elements being built -->
-<!-- ===================================================================== -->
-<target name="allElements">
- <ant antfile="${genericTargets}" target="${target}" >
- <property name="type" value="feature" />
- <property name="id" value="org.eclipse.<c:get select="$build/@projectNamespace"/>.tests" />
- </ant>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Targets to assemble the built elements for particular configurations -->
-<!-- These generally call the generated assemble scripts (named in -->
-<!-- ${assembleScriptName}) but may also add pre and post processing -->
-<!-- Add one target for each root element and each configuration -->
-<!-- ===================================================================== -->
-
-<target name="assemble.org.eclipse.<c:get select="$build/@projectNamespace"/>.tests">
- <property name="archiveName" value="<c:get select="$build/@parentProjectName"/>-${subprojectName}-junit-tests-${buildAlias}.zip"/>
- <ant antfile="${assembleScriptName}"/>
-<!-- ADD POST STEPS -->
-</target>
-
-<!-- ===================================================================== -->
-<!-- Check out map files from correct repository -->
-<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
-<!-- ===================================================================== -->
-<target name="checkLocal">
- <available property="mapsLocal" file="${buildDirectory}/maps" />
-</target>
-
-<target name="getMapFiles" depends="checkLocal" unless="mapsLocal">
-
- <!-- *** change the repo info -->
- <property name="mapCvsRoot" value=":${cvsReadProtocol}:${cvsReadUser}@${cvsHost}:${cvsRep}" />
- <property name="mapVersionTag" value="HEAD" />
- <property name="packagePath" value="org.eclipse.${projectName}/org.eclipse.${subprojectName2}.releng/maps"/>
-
- <cvs cvsRsh="ssh" cvsRoot="${mapCvsRoot}" tag="${mapVersionTag}"
- package="${packagePath}" dest="${buildDirectory}/maps" />
- <copy todir="${buildDirectory}/maps/CVS" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}/CVS" />
- </copy>
- <copy todir="${buildDirectory}/maps" overwrite="true">
- <fileset dir="${buildDirectory}/maps/${packagePath}" />
- </copy>
- <delete dir="${buildDirectory}/maps/org.eclipse.${projectName}" />
-
- <!--tag the map files project-->
- <antcall target="tagMapFiles" />
-</target>
-
-<target name="tagMapFiles" if="tagMaps">
- <cvs dest="${buildDirectory}/maps/org.eclipse.${subprojectName2}" command="tag v${timestamp}" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before setup -->
-<!-- ===================================================================== -->
-<target name="preSetup">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after setup but before starting the build proper -->
-<!-- ===================================================================== -->
-<target name="postSetup">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before fetching the build elements -->
-<!-- ===================================================================== -->
-<target name="preFetch">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after the fetch -->
-<!-- ===================================================================== -->
-<target name="postFetch">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@buildid@">
- <include name="**/about.mappings" />
- </replace>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before generating build scripts -->
-<!-- ===================================================================== -->
-<target name="preGenerate">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after generating the build scripts -->
-<!-- ===================================================================== -->
-<target name="postGenerate">
- <antcall target="clean" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before assembling -->
-<!-- ===================================================================== -->
-<target name="preAssemble">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after assembling-->
-<!-- ===================================================================== -->
-<target name="postAssemble">
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do before running the build.xmls for the elements being built. -->
-<!-- ===================================================================== -->
-<target name="preProcess">
- <replace dir="${buildDirectory}/plugins" value="${timestamp}" token="@build@">
- <include name="**/about.mappings" />
- </replace>
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after running the build.xmls for the elements being built. -->
-<!-- ===================================================================== -->
-<target name="postProcess">
- <condition property="logsAvailable">
- <istrue value="${javacVerbose}"/>
- </condition>
- <antcall target="gatherLogs" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Steps to do after everything is built and assembled -->
-<!-- (e.g., testing, posting, emailing, ...) -->
-<!-- ===================================================================== -->
-<target name="postBuild">
- <antcall target="packageTestFramework" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Helper targets -->
-<!-- ===================================================================== -->
-<target name="gatherLogs" if="logsAvailable">
- <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
- <antcall target="allElements">
- <param name="target" value="gatherLogs" />
- </antcall>
-
- <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
- <fileset dir="${buildDirectory}/features/org.eclipse.<c:get select="$build/@projectNamespace"/>.tests">
- <include name="*.log.zip" />
- </fileset>
- </unzip>
-</target>
-
-<target name="clean" unless="noclean">
- <antcall target="allElements">
- <param name="target" value="cleanElement" />
- </antcall>
-</target>
-
-<target name="packageTestFramework">
- <!--package automated test framework used in <c:get select="$build/@parentProjectName"/>-${subprojectName} builds-->
-
- <property name="workingDirectory" value="${buildDirectory}/test.assembly" />
- <echo message="workingDirectory: ${workingDirectory}"/>
-
- <!--unzip the junit tests-->
- <mkdir dir="${workingDirectory}/eclipse" />
- <unzip dest="${workingDirectory}" overwrite="true">
- <fileset dir="${buildDirectory}/${buildLabel}"><include name="**/<c:get select="$build/@parentProjectName"/>-${subprojectName}-junit-tests*.zip"/></fileset>
- </unzip>
-
- <!-- create top level testing directory-->
- <delete dir="${workingDirectory}/testing"/>
- <mkdir dir="${workingDirectory}/testing" />
-
- <!--compile the tool used to generate the test.properties file, then run it.-->
- <!--test.properties maps test plugin id's to the name of the plugin directory-->
-
- <!--eclipse.home is relative to the scripts directory in the org.eclipse.pde.build plugin. Assume the plugins used in the classpath are in the same directory as org.eclipse.pde.build-->
- <property name="eclipse.home" value="../../.." />
-
- <generateTestProperties
- buildDirectory="${buildDirectory}"
- featureId="org.eclipse.<c:get select="$build/@projectNamespace"/>.tests"
- outputFile="${workingDirectory}/testing/test.properties"
- />
-
- <!--load the property file created with the directory names for all test plugins-->
- <property file="${workingDirectory}/testing/test.properties" />
-
- <!-- Remove the plugin version number appended to the org.eclipse.test plugin directory.
- This is so that contributors of test.xml's do not have to update their paths to
- library.xml in org.eclipse.test whenever its version is updated.
- -->
- <move todir="${workingDirectory}/eclipse/plugins/org.eclipse.test">
- <fileset dir="${workingDirectory}/eclipse/plugins/${org.eclipse.test}" />
- </move>
-
- <!--the Ant move task leaves behind an empty directory-->
- <delete dir="${workingDirectory}/eclipse/plugins/${org.eclipse.test}" includeEmptyDirs="true" />
-
- <!-- rezip the JUnit plugin tests -->
- <zip destfile="${workingDirectory}/testing/<c:get select="$build/@parentProjectName"/>-${subprojectName}-junit-tests-${buildAlias}.zip">
- <zipfileset dir="${workingDirectory}/eclipse" prefix="eclipse"/>
- </zip>
-
- <!--Copy scripts and doc used in the automated testing to the testing directory-->
- <copy todir="${workingDirectory}/testing">
- <fileset dir="${buildDirectory}/plugins/org.eclipse.test" includes="testframework.html,JUNIT.XSL" />
- </copy>
- <copy todir="${workingDirectory}/testing">
- <fileset dir="${builderDirectory}/scripts" />
- </copy>
-
- <!--copy in the file containing the URL of the Eclipse build used for testing-->
- <copy todir="${workingDirectory}/testing" file="${buildDirectory}/../build.cfg" />
-
- <!--create zip file of the automated testing framework-->
- <zip destfile="${buildDirectory}/${buildLabel}/<c:get select="$build/@parentProjectName"/>-${subprojectName}-automated-tests-${buildAlias}.zip">
- <zipfileset dir="${workingDirectory}/testing" prefix="testing"/>
- </zip>
-
- <delete file="${buildDirectory}/${buildLabel}/<c:get select="$build/@parentProjectName"/>-${subprojectName}-junit-tests-${buildAlias}.zip" />
-</target>
-
-<!-- ===================================================================== -->
-<!-- Default target -->
-<!-- ===================================================================== -->
-<target name="noDefault">
- <echo message="You must specify a target when invoking this file" />
-</target>
-
-</project>
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/readme.html.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/readme.html.jet
deleted file mode 100644
index 174335f..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/readme.html.jet
+++ /dev/null
@@ -1,165 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-<html>
-<head>
-<title>Instructions</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</head>
-
-<body bgcolor="#FFFFFF" text="#000000">
-<font size="+2"> Automated Testing of Modeling Project Builds</font>
-<p>last updated: November 9, 2005</p>
-<p><font size="+1">Description</font></p>
-<p>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.</p>
-<p>Click <a href="testframework.html">here</a> for a description of the testing
- framework, and how it can be used outside of the setup described here.</p>
-<p>If you simply wish to write and run JUnit tests interactively from an Eclipse
- workbench, try one of the links below:</p>
-<p><a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/plugins/org.eclipse.jdt.junit/index.html">JUnit
- Support in Eclipse</a><br>
-<a href="http://dev.eclipse.org:8080/help/content/help:/org.eclipse.jdt.doc.user/tasks/tasks-207.htm?resultof=%6a%75%6e%69%74%20&toc=%2Forg.eclipse.jdt.doc.user%2Ftoc.xml">Using
- JUnit</a></p>
-
-<p><font size="+1">Requirements</font></p>
-<p>1. All test machines must have a java runtime environment (version 1.3.1) installed and added to the path environment variable (see
- <a href="#vm">-vm</a> parameter below).<br>
- 2. <a href="http://www.info-zip.org/pub/infozip/UnZip.html">Info-ZIP UnZip</a>
- version 5.41 or later installed and added to the path.<br>
- 3. The Automated Test feature from a
- <a href="http://www.eclipse.org/modeling/<c:get select="$build/@parentProjectName"/>">downloads</a>.
- This contains the test framework plugins and the JUnit test plugins to run.<br>
- 4. The zip file from the same build as the Automated Test feature. You can use the <c:get select="$build/@parentProjectName"/>-*-SDK zip file instead of the individual files.<br>
- 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.</p>
-<p><font size="+1">Setup</font></p>
-<p>1. Extract the <c:get select="$build/@parentProjectName"/>-*-automated-tests-<c:get select="$build/@incubationTag"/>&lt;buildid&gt;.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 &quot;<i>testing</i>&quot;.<br>
- 2. Place the Eclipse SDK zip file and the project's runtime in the <i>testing</i> directory.
- Do not unzip these files. (The test scripts will take care of this)<br>
-</p>
-<p><font size="+1">Running Tests</font></p>
-<p>1. cd to the <i>testing</i> directory<br>
- 2. Run the following script:</p>
-<p><b>runtests.sh [-os &lt;operating system&gt;] [-ws &lt;windowing system&gt;] [-arch
- &lt;architecture&gt;] [-noclean] [&lt;testTarget&gt;][-properties &lt;path&gt;][-vm
- &lt;path to java executable&gt;]</b></p>
-All parameters and targets are optional on windows systems. Just running &quot;runtests.sh&quot;
-will run <b>ALL</b> 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.
-<br>
-<br>
-Test results are placed in the <i>testing</i>/<i>results</i> directory in xml and html format.<br>
-<p><font size="+1"><a name="vm"></a>Parameters</font></p>
-<table width="90%" border="1">
- <tr>
- <td>Parameter</td>
- <td>Description</td>
- </tr>
- <tr>
- <td>-os &lt;operating system&gt;</td>
- <td>The OS the tests are being run on. One of: aix, hpux, linux, qnx, solaris,
- win32. <b>Default win32</b></td>
- </tr>
- <tr>
- <td>-ws &lt;windowing system&gt;</td>
- <td>The windowing system the tests are being run on. One of: motif, gtk, photon,
- win32. <b>Default win32</b></td>
- </tr>
- <tr>
- <td>-arch &lt;architecture&gt;</td>
- <td>The architecture the tests are being run on. One of: ppc, PA_RISC, x86,
- sparc. <b>Default x86</b></td>
- </tr>
- <tr>
- <td>-noclean</td>
- <td>Run tests without installing an Eclipse and GEF SDK and tests between
- test targets. Default is to re-install these between test targets.</td>
- </tr>
- <tr>
- <td>-properties</td>
- <td>Used 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 &quot;extraVMargs=&lt;the
- args to pass to the vm&gt;&quot; to the specified properties file.</td>
- </tr>
- <tr>
- <td>-vm</td>
- <td>The 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, &quot;-vm c:\sun131\jre\bin\java&quot;. Default set to &quot;java&quot;
- (i.e. java executable on system path). </td>
- </tr>
-</table>
-
-<p><font size="+1">Test Targets</font></p>
-<p>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 <b>all</b>
- test target is run.</p>
-
-<table width="90%" border="1">
- <tr>
- <td>all</td>
- <td>Runs all the targets below.</td>
- </tr>
- <tr>
- <td><c:get select="$build/@parentProjectName"/></td>
- <td>Runs the JUnit tests located in the test plug-ins</td>
- </tr>
- <tr>
- <td>genHtml</td>
- <td>Converts xml test results in the &quot;<i>testing</i>/<i>results</i>&quot; directory
- to html.</td>
- </tr>
-</table>
-<p>&nbsp;</p>
-<p><font size="+1"><a name="appendixb"></a>Appendix A- Supported os, ws, and arch
- value combinations</font></p>
-<p>The following table contains the values that can be used with the -os, -ws,
- and -arch switches.</p>
-<table width="75%" border="1">
- <tr>
- <td>Operating System (os)</td>
- <td>Windowing System (ws)</td>
- <td>Architecture (arch)</td>
- </tr>
- <tr>
- <td>aix</td>
- <td>motif</td>
- <td>ppc</td>
- </tr>
- <tr>
- <td>hpux</td>
- <td>motif</td>
- <td>PA_RISC</td>
- </tr>
- <tr>
- <td>linux</td>
- <td>gtk</td>
- <td>x86</td>
- </tr>
- <tr>
- <td>linux</td>
- <td>motif</td>
- <td>x86</td>
- </tr>
- <tr>
- <td height="24">qnx</td>
- <td height="24">photon</td>
- <td height="24">x86</td>
- </tr>
- <tr>
- <td>solaris</td>
- <td>motif</td>
- <td>sparc</td>
- </tr>
- <tr>
- <td>win32</td>
- <td>win32</td>
- <td>x86</td>
- </tr>
-</table>
-</body>
-</html>
diff --git a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/test.xml.jet b/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/test.xml.jet
deleted file mode 100644
index 59d0859..0000000
--- a/examples/org.eclipse.jet.ec2008.pushbuttonbuild/templates/project/builder/tests/scripts/test.xml.jet
+++ /dev/null
@@ -1,90 +0,0 @@
-<%!
-/* Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. */
-%>
-<project name="Automated Testing" default="all" basedir="." >
-
- <!--properties file containing the plugin directory name including version number-->
- <property file="test.properties" />
-
- <!-- urls and such from the build -->
- <property file="${basedir}/../../../build.cfg" />
-
- <!--default directory where test-eclipse will be installed-->
- <property name="install" value="${basedir}/target" />
-
- <!--name that can be added to report name to identify which platform tests results come from-->
- <property name="platform" value="" />
-
- <!-- The root of the eclipse installation -->
- <property name="eclipse-home" value="${install}/eclipse" />
-
- <!-- The directory that will contain the xml and html results from the tests that are run -->
- <property name="results" value="${basedir}/results" />
-
- <target name="setup" if="clean" description="Reinstall the test Eclipse installation if specified by user">
- <delete dir="${install}" /><mkdir dir="${install}" />
-
- <!-- TODO: if your project requires more dependencies, add them here -->
- <echo message="Download, then unpack: Eclipse, EMF ..." />
- <property name="common.releng.dir" value="${basedir}/../../../org.eclipse.modeling.common.releng"/>
- <property name="getTestDependencies.xml" value="${common.releng.dir}/scripts/getTestDependencies.xml"/>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}" dir="${common.releng.dir}">
- <property name="url" value="${eclipseURL}" />
- <property name="file" value="${eclipseFile}" />
- <property name="unpackDest" value="${install}"/>
- </ant>
- <ant target="getTestDependency" antfile="${getTestDependencies.xml}" dir="${common.releng.dir}">
- <property name="url" value="${emfURL}" />
- <property name="file" value="${emfFile}" />
- <property name="unpackDest" value="${install}"/>
- </ant>
-
- <property name="dir" location="."/>
- <echo message="Unpack SDK + JUnit Tests (${dir}/<c:get select="$build/@parentProjectName"/>-*.zip) ..."/>
- <unzip dest="${install}" overwrite="true">
- <fileset dir="${dir}"><include name="**/<c:get select="$build/@parentProjectName"/>-*.zip"/></fileset>
- </unzip>
- </target>
-
- <target name="runtests" depends="setup" description="Runs ant on the test.xml for a specified plugin. Requires a property value setting for testPlugin only if test.properties is not available. The property testPlugin represents a directory name made up of the plugin id and plugin version. This directory must contain a valid test.xml.">
-<c:if test="$build/@testsAreJarred = 'false'">
- <echo message="${eclipse-home}/plugins/${testPlugin} is not a jarred plugin. No unpack required!"/>
-</c:if>
- <echo message="Unpack ${eclipse-home}/plugins/${testPlugin}.jar to ${eclipse-home}/plugins/${testPlugin} ... "/>
- <move file="${eclipse-home}/plugins/${testPlugin}.jar" tofile="${eclipse-home}/plugins/${testPlugin}_.jar"/>
- <unjar src="${eclipse-home}/plugins/${testPlugin}_.jar" dest="${eclipse-home}/plugins/${testPlugin}"/>
- <delete file="${eclipse-home}/plugins/${testPlugin}_.jar"/>
-
- <echo message="Running test.xml from jarfile ${eclipse-home}/plugins/${testPlugin} ... "/>
- <ant antfile="${eclipse-home}/plugins/${testPlugin}/test.xml" dir="${eclipse-home}"/>
- <copy file="${eclipse-home}/${report}.xml" tofile="${results}/xml/${report}_${platform}.xml" />
- </target>
-
- <target name="<c:get select="$build/@parentProjectName"/>" description="Runs the test.xml of the tests plugin">
- <antcall target="runtests">
- <param name="testPlugin" value="${org.eclipse.<c:get select="$build/@projectNamespace"/>.tests}" />
- <param name="report" value="org.eclipse.<c:get select="$build/@projectNamespace"/>.tests" />
- </antcall>
-
- <!-- test if chkpii script exists before proceeding -->
- <property name="common.releng.dir" value="${basedir}/../../../org.eclipse.modeling.common.releng"/>
- <property name="chkpii.xml" value="${common.releng.dir}/scripts/chkpii.xml"/>
- <available file="${chkpii.xml}" property="chkpiiXMLAvailable"/>
- <antcall target="runChkpii"/>
- </target>
-
- <target name="runChkpii" if="chkpiiXMLAvailable">
- <ant target="chkpii" antfile="${chkpii.xml}" inheritall="true">
- <property name="zipPattern" value="<c:get select="$build/@parentProjectName"/>-*.zip"/>
- </ant>
- </target>
-
- <target name="all">
- <antcall target="<c:get select="$build/@parentProjectName"/>" />
- <antcall target="genHtml" />
- </target>
-
- <target name="genHtml" description="Generates HTML results with provided JUNIT.XSL provided">
- <style style="JUNIT.XSL" basedir="${results}/xml" destdir="${results}/html" />
- </target>
-</project>

Back to the top