--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig 2017-03-06 14:35:07.000000000 +0000
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml 2017-03-07 15:30:44.993586317 +0000
@@ -39,21 +39,6 @@
arg1="${testPlugin}"
arg2="org.eclipse.equinox.p2.tests.discovery" />
-
-
-
-
-
-
-
@@ -61,7 +46,7 @@
+ value="${eclipse-home}" />
@@ -96,19 +81,6 @@
name="setupRepo"
depends="init"
unless="testRepoCreated">
-
-
-
-
-
-
-
-
-
+ removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
+
+
-
+ removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
+
+
+ removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
+
+
@@ -333,11 +307,10 @@
-
-
+ removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
+
+
@@ -823,7 +796,7 @@
+ value="file:${repoLocation}" />
@@ -2017,6 +1990,15 @@
+
+
+
+
+
+
+
+
+
-
@@ -2227,7 +2207,6 @@
-
@@ -2243,7 +2222,6 @@
-
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh.orig 2017-03-03 12:36:38.576140783 +0000
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh 2017-03-03 12:40:39.324608342 +0000
@@ -6,6 +6,45 @@
# version.
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=437069
+function findXvncAndSetDisplay() {
+ # 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
+}
+
+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 cleanupXvnc() {
+ # Clean up if we used Xvnc
+ if [ -e Xvnc.cfg ]
+ then
+ kill $Xvncpid
+ rm Xvnc.cfg
+ fi
+}
+
echo "command line as passed into $(basename ${0}): ${*}"
echo "command line (quoted) as passed into $(basename ${0}): ${@}"
@@ -159,6 +198,8 @@
if [[ "true" == "${START_WINDOW_MGT}" ]]
then
./startWindowManager.sh
+else
+ findXvncAndSetDisplay
fi
# During production tests, we define 'testedPlatform' as a combination of
@@ -192,6 +233,7 @@
echo "platformString: ${platformString}"
echo "testedPlatform: ${testedPlatform}"
+ANT_OPTS="${ANT_OPTS} -DtestedPlatform=${testedPlatform}"
# -Dtimeout=300000 "${ANT_OPTS}"
if [[ -n "${extdirproperty}" ]]
then
@@ -202,4 +244,4 @@
$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
-
+cleanupXvnc