5826134
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig	2017-03-06 14:35:07.000000000 +0000
5826134
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml	2017-03-07 15:30:44.993586317 +0000
5826134
@@ -39,21 +39,6 @@
5826134
         arg1="${testPlugin}"
5826134
         arg2="org.eclipse.equinox.p2.tests.discovery" />
5826134
     </condition>
5826134
-    
5826134
-      property="extraIU"
5826134
-      value="org.eclipse.osgi.compatibility.plugins.feature.feature.group">
5826134
-      <or>
5826134
-        
5826134
-          arg1="${testPlugin}"
5826134
-          arg2="org.eclipse.osgi.tests" />
5826134
-        
5826134
-          arg1="${testPlugin}"
5826134
-          arg2="org.eclipse.pde.ui.tests" />
5826134
-        
5826134
-          arg1="${testPlugin}"
5826134
-          arg2="org.eclipse.pde.api.tools.tests" />
5826134
-      </or>
5826134
-    </condition>
5826134
 
5826134
     <antcall target="setupRepo" />
5826134
     <antcall target="${setupTarget}" />
5826134
@@ -61,7 +46,7 @@
5826134
     <antcall target="installPreferences">
5826134
       
5826134
         name="eclipse-home"
5826134
-        value="${eclipse-home}/eclipse" />
5826134
+        value="${eclipse-home}" />
5826134
     </antcall>
5826134
     <antcall target="installExtraPlugins" />
5826134
     <antcall target="installTestPlugins" />
5826134
@@ -96,19 +81,6 @@
5826134
     name="setupRepo"
5826134
     depends="init"
5826134
     unless="testRepoCreated">
5826134
-    <mkdir dir="${repoLocation}" />
5826134
-    
5826134
-      dir="${basedir}"
5826134
-      executable="unzip"
5826134
-      failonerror="false"
5826134
-      resultproperty="unzipResultCode">
5826134
-      <arg value="-o" />
5826134
-      <arg value="-qq" />
5826134
-      <arg value="${repoZip}" />
5826134
-      <arg value="-d" />
5826134
-      <arg value="${repoLocation}" />
5826134
-    </exec>
5826134
-    <echo message="unzip resultcode: ${unzipResultCode}" />
5826134
     
5826134
     
5826134
       name="testRepoCreated"
5826134
@@ -128,8 +100,9 @@
5826134
       message="runtime archive (SDK) did not exist where expected. runtimeArchive: ${executionDir}/${runtimeArchive}" />
5826134
     <echo message="Deleting existing ${eclipse-home}, if any." />
5826134
     
5826134
-      dir="${eclipse-home}"
5826134
-      verbose="false" />
5826134
+      removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
5826134
+      <fileset dir="${eclipse-home}" followsymlinks="false" />
5826134
+    </delete>
5826134
     <echo message="Fresh extract ${runtimeArchive} into ${install} for testing." />
5826134
     
5826134
       dir="${install}"
5826134
@@ -155,9 +128,9 @@
5826134
       message="runtime archive (SDK) did not exist where expected. runtimeArchive: ${executionDir}/${runtimeArchive}" />
5826134
     <echo message="Deleting existing ${eclipse-home}, if any." />
5826134
     
5826134
-      dir="${eclipse-home}"
5826134
-      verbose="false" />
5826134
-
5826134
+      removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
5826134
+      <fileset dir="${eclipse-home}" followsymlinks="false" />
5826134
+    </delete>
5826134
     <echo message="Fresh extract ${runtimeArchive} into ${install} for testing." />
5826134
     
5826134
       dir="${install}"
5826134
@@ -309,8 +282,9 @@
5826134
       message="plaform archive did not exist where expected. platformArchive: ${platformLocation}/${platformArchive}" />
5826134
     
5826134
     
5826134
-      verbose="false"
5826134
-      dir="${platformLocation}/eclipse" />
5826134
+      removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
5826134
+      <fileset dir="${platformLocation}/eclipse" followsymlinks="false" />
5826134
+    </delete>
5826134
     
5826134
       dir="${platformLocation}"
5826134
       executable="unzip">
5826134
@@ -333,11 +307,10 @@
5826134
     
5826134
       unless="platformArchiveExists"
5826134
       message="plaform archive did not exist where expected. platformArchive: ${platformLocation}/${platformArchive}" />
5826134
-
5826134
-
5826134
     
5826134
-      verbose="false"
5826134
-      dir="${platformLocation}/eclipse" />
5826134
+      removeNotFollowedSymlinks="true" failonerror="false" verbose="false">
5826134
+      <fileset dir="${platformLocation}/eclipse" followsymlinks="false" />
5826134
+    </delete>
5826134
     
5826134
       dir="${platformLocation}"
5826134
       executable="tar">
5826134
@@ -823,7 +796,7 @@
5826134
 
5826134
     
5826134
       name="current.build.repo"
5826134
-      value="http://${DOWNLOAD_HOST}/eclipse/updates/${eclipseStreamMajor}.${eclipseStreamMinor}-${buildType}-builds/${buildId}" />
5826134
+      value="file:${repoLocation}" />
5826134
     <echo message="current.build.repo: ${current.build.repo}" />
5826134
 
5826134
 
5826134
@@ -2017,6 +1990,15 @@
5826134
     <antcall target="quickTests" />
5826134
     <antcall target="longRunningTests" />
5826134
 
5826134
+    
5826134
+    <mkdir dir="${results}/split-xml" />
5826134
+    <xslt style="${executionDir}/splitter.xsl" basedir="${results}/xml" includes="*.xml" destdir="${results}/split-xml"/>
5826134
+    
5826134
+    <junitreport todir="${results}/xml" tofile="org.eclipse.sdk.tests.xml">
5826134
+      <fileset dir="${results}/split-xml" includes="*.xml" />
5826134
+    </junitreport>
5826134
+    
5826134
+    <xslt style="${executionDir}/JUNIT.XSL" basedir="${results}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${results}/html" />
5826134
   </target>
5826134
 
5826134
   
5826134
@@ -2194,8 +2176,6 @@
5826134
   
5826134
     name="platform"
5826134
     depends="init">
5826134
-    
5826134
-    <antcall target="relEng" />
5826134
 
5826134
     <antcall target="ant" />
5826134
     <antcall target="antui" />
5826134
@@ -2227,7 +2207,6 @@
30b23e4
     <antcall target="e4CssSwt" />
30b23e4
     <antcall target="e4UI" />
30b23e4
     <antcall target="equinoxds" />
30b23e4
-    <antcall target="equinoxp2discovery" />
30b23e4
     <antcall target="bidi" />
30b23e4
     <antcall target="ltkuirefactoringtests" />
30b23e4
     <antcall target="ltkcorerefactoringtests" />
5826134
@@ -2243,7 +2222,6 @@
5826134
     <antcall target="osgi" />
5826134
     <antcall target="coreresources" />
5826134
     <antcall target="equinoxp2" />
5826134
-    <antcall target="teamcvs" />
5826134
     <antcall target="jface" />
5826134
     <antcall target="ui" />
5826134
     <antcall target="uiperformance" />
5826134
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh.orig	2017-03-03 12:36:38.576140783 +0000
5826134
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh	2017-03-03 12:40:39.324608342 +0000
5826134
@@ -6,6 +6,45 @@
5826134
 # version. 
5826134
 # https://bugs.eclipse.org/bugs/show_bug.cgi?id=437069
5826134
 
5826134
+function findXvncAndSetDisplay() {
5826134
+    # Try to find Xvnc
5826134
+    xvnc=
5826134
+    if [ -a /usr/bin/Xvnc ]
5826134
+    then
5826134
+        xvnc=/usr/bin/Xvnc
5826134
+        setupXvnc
5826134
+    else
5826134
+        if [ -a /usr/X11/bin/Xvnc ]
5826134
+        then
5826134
+            xvnc=/usr/X11/bin/Xvnc
5826134
+            setupXvnc
5826134
+        else
5826134
+            echo "Couldn't find Xvnc (/usr/bin/Xvnc or /usr/X11/bin/Xvnc).  Using DISPLAY=0:0"
5826134
+            DISPLAY=$($HOST):0.0
5826134
+        fi
5826134
+    fi
5826134
+    export DISPLAY
5826134
+}
5826134
+
5826134
+function setupXvnc() {
5826134
+    # Pick a high display number.
5826134
+    port=`expr '(' $RANDOM '*' 9 / 32767 ')' + 58`
5826134
+    echo localhost > Xvnc.cfg
5826134
+    echo "Setting up Xvnc on port ${port} with password VNCpassword1"
5826134
+    $xvnc :$port -screen 1 1024x768x32 -auth Xvnc.cfg -localhost -PasswordFile eclipse-tests-vncpwd &> Xvnc.log &
5826134
+    Xvncpid=$!
5826134
+    DISPLAY=$($HOST):$port
5826134
+}
5826134
+
5826134
+function cleanupXvnc() {
5826134
+    # Clean up if we used Xvnc
5826134
+    if [ -e Xvnc.cfg ]
5826134
+    then
5826134
+        kill $Xvncpid
5826134
+        rm Xvnc.cfg
5826134
+    fi
5826134
+}
5826134
+
5826134
 echo "command line as passed into $(basename ${0}): ${*}"
5826134
 echo "command line (quoted) as passed into $(basename ${0}): ${@}"
5826134
 
5826134
@@ -159,6 +198,8 @@
5826134
 if [[ "true" == "${START_WINDOW_MGT}" ]]
5826134
 then 
5826134
  ./startWindowManager.sh
5826134
+else
5826134
+ findXvncAndSetDisplay
5826134
 fi
5826134
 
5826134
 # During production tests, we define 'testedPlatform' as a combination of
5826134
@@ -192,6 +233,7 @@
5826134
 echo "platformString: ${platformString}"
5826134
 echo "testedPlatform: ${testedPlatform}"
5826134
 
5826134
+ANT_OPTS="${ANT_OPTS} -DtestedPlatform=${testedPlatform}"
5826134
 # -Dtimeout=300000 "${ANT_OPTS}"
5826134
 if [[ -n "${extdirproperty}" ]]
5826134
 then
5826134
@@ -202,4 +244,4 @@
5826134
   $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
5826134
 fi
5826134
 
5826134
-
5826134
+cleanupXvnc