--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh.bak 2013-03-14 11:05:42.000000000 +0100
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh 2013-03-14 13:31:19.161559741 +0100
@@ -1,5 +1,72 @@
#!/usr/bin/env bash
+function findXvncAndSetDisplay() {
+# if [ ${headless} == 1 ]; then
+ # Try to find Xvnc
+ xvnc=
+ if [ -a /usr/bin/Xvnc ]
+ then
+ xvnc=/usr/bin/Xvnc
+ setupXvnc
+ else
+ if [ -a /usr/X11/bin/Xvnc ]
+ then
+ xvnc=/usr/X11/bin/Xvnc
+ setupXvnc
+ else
+ echo "Couldn't find Xvnc (/usr/bin/Xvnc or /usr/X11/bin/Xvnc). Using DISPLAY=0:0"
+ DISPLAY=`$HOST`:0.0
+ fi
+ fi
+ export DISPLAY
+# fi
+}
+
+function setupXvnc() {
+ # Pick a high display number.
+ port=`expr '(' $RANDOM '*' 9 / 32767 ')' + 58`
+ echo localhost > Xvnc.cfg
+ echo "Setting up Xvnc on port ${port} with password VNCpassword1"
+ $xvnc :$port -screen 1 1024x768x32 -auth Xvnc.cfg -localhost -PasswordFile eclipse-tests-vncpwd &> Xvnc.log &
+ Xvncpid=$!
+ DISPLAY=`$HOST`:$port
+}
+
+function setArch() {
+ if [ "x$buildArch" = "x" ]
+ then
+ if uname -m > /dev/null 2>&1; then
+ arch=`uname -m`
+ else
+ arch=`uname -p`
+ fi
+ # Massage arch for Eclipse-uname differences
+ case $arch in
+ i[0-9]*86)
+ arch=x86 ;;
+ ia64)
+ arch=ia64 ;;
+ ppc)
+ arch=ppc ;;
+ x86_64)
+ arch=x86_64 ;;
+ *)
+ echo "Unrecognized architecture: $arch" 1>&2
+ exit 1 ;;
+ esac
+ echo >&2 "Architecture not specified. Assuming host architecture: $arch"
+ fi
+}
+
+function cleanupXvnc() {
+ # Clean up if we used Xvnc
+ if [ -e Xvnc.cfg ]
+ then
+ kill $Xvncpid
+ rm Xvnc.cfg
+ fi
+}
+
# This file should never exist or be needed for production machine,
# but allows an easy way for a "local user" to provide this file
# somewhere on the search path ($HOME/bin is common),
@@ -92,59 +159,30 @@
#necessary when invoking this script through rsh
cd $dir
+ mkdir -p /tmp/eclipse-tests-directory
+ pushd /tmp/eclipse-tests-directory
+ rm -rf *
+ cp ${testslocation}/*.properties .
+ cp ${testslocation}/library.xml .
if [ ! -r eclipse ]
then
- tar -xzf eclipse-SDK-*.tar.gz
- # note, the file pattern to match, must not start with */plugins because there is no leading '/' in the zip file, since they are repos.
- unzip -qq -o -C eclipse-junit-tests-*.zip plugins/org.eclipse.test* -d eclipse/dropins/
+ pushd @libdir@
+ tar czf /tmp/eclipse-tests-directory/eclipse-SDK-temp-linux-gtk-x86_64.tar.gz eclipse
+ popd
+ cp -rf @libdir@/eclipse eclipse
fi
# run tests
launcher=`ls eclipse/plugins/org.eclipse.equinox.launcher_*.jar`
+findXvncAndSetDisplay
+setArch
+export ANT_HOME=@USR@/share/ant
+@USR@/bin/./ant \
+-file "${testslocation}/test.xml" $tests \
+-Dws=$ws -Dos=$os -Darch=$arch -Dos.arch=$arch \
+-DbuildId=v20120903-1347 -Dbasedir="/tmp/eclipse-tests-directory" \
+-DruntimeArchive="eclipse-SDK-temp-linux-gtk-x86_64.tar.gz" \
+-DrepoLocation="${testslocation}" \
+-Dorg.eclipse.test="3.3.100" \
+-D$installmode=true $properties
- echo " = = = Start list environment variables in effect = = = ="
- env
- echo " = = = End list environment variables in effect = = = ="
-
- # 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 "Check if any window managers are running (xfwm|twm|metacity|beryl|fluxbox|compiz):"
- wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz" | grep -v egrep)
- echo "Window Manager processes: $wmpss"
- echo
-
- if [[ -z $wmpss ]]
- then
- echo "No window managers processes found running, so will start metacity"
- metacity --replace --sm-disable &
- METACITYPID=$!
- echo $METACITYPID > epmetacity.pid
- else
- echo "Existing window manager found running, so did not force start of metacity"
- fi
-
- echo
-
- # list out metacity processes so overtime we can see if they accumulate, or if killed automatically
- # when our process exits. If not automatic, should use epmetacity.pid to kill it when we are done.
- echo "Current metacity processes running (check for accumulation):"
- ps -ef | grep "metacity" | grep -v grep
- echo
-
- echo "Triple check if any window managers are running (at least metacity should be!):"
- wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz" | grep -v egrep)
- echo "Window Manager processes: $wmpss"
- echo
- echo "extdirprop in runtest: ${extdirprop}"
- echo "extdirproperty in runtest: ${extdirproperty}"
-
- # -Dtimeout=300000 "${ANT_OPTS}"
- if [[ ! -z "${extdirproperty}" ]]
- then
- $vmcmd "${extdirproperty}" -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml $tests -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger
- else
- $vmcmd -Dosgi.os=$os -Dosgi.ws=$ws -Dosgi.arch=$arch -jar $launcher -data workspace -application org.eclipse.ant.core.antRunner -file ${PWD}/test.xml $tests -Dws=$ws -Dos=$os -Darch=$arch -D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger
- fi
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig 2013-05-01 13:30:04.000000000 +0200
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml 2013-05-03 14:44:17.278068172 +0200
@@ -175,99 +175,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -295,7 +211,7 @@
-
+
@@ -842,6 +758,18 @@
arg2="" />
+
+
+
+
+
+
+ trying to find ${testPluginFolder}
+
+
+
+
+
@@ -1420,7 +1348,17 @@
name="message"
value="end longRunningTests" />
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1475,7 +1413,6 @@
-
@@ -1558,7 +1495,7 @@
-
+