365159b
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig	2014-11-28 14:54:50.000000000 +0000
365159b
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml	2014-11-28 15:44:49.542304044 +0000
b199371
@@ -24,13 +24,6 @@
b199371
     has to move to "top of file" ... outer scope?
b199371
    <property file="${eclipseBuilderDir}/eclipse/buildConfigs/sdk.tests/testConfigs/${testPlatform}/testing.properties" />
b199371
 -->
b199371
-  
b199371
-    name="testingPropertiesfile"
b199371
-    value="testing.properties" />
b199371
-  <loadproperties>
b199371
-    <file file="${testingPropertiesfile}" />
b199371
-  </loadproperties>
b199371
-
b199371
b199371
   
b199371
   
365159b
@@ -207,79 +207,8 @@
Krzysztof Daniel 0d0e616
 
30b23e4
   
30b23e4
   <target name="setupPlatform">
30b23e4
-    <echo message="os.arch ${os.arch}" />
30b23e4
     <loadproperties srcfile="equinoxp2tests.properties" />
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.linux}">
30b23e4
-      <and>
30b23e4
-        <os family="unix" />
30b23e4
-        <not>
30b23e4
-          <or>
30b23e4
-            <or>
30b23e4
-              <os arch="x86_64" />
30b23e4
-              <os arch="amd64" />
30b23e4
-            </or>
30b23e4
-            <os family="mac" />
30b23e4
-          </or>
30b23e4
-        </not>
30b23e4
-      </and>
30b23e4
-    </condition>
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.macosx-x86_64}">
30b23e4
-      <and>
30b23e4
-        <os family="mac" />
30b23e4
-        <os family="unix" />
30b23e4
-        <or>
30b23e4
-          <os arch="x86_64" />
30b23e4
-          <os arch="amd64" />
30b23e4
-        </or>
30b23e4
-      </and>
30b23e4
-    </condition>
365159b
-  
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.macosx}">
30b23e4
-      <and>
30b23e4
-        <os family="mac" />
30b23e4
-        <os family="unix" />
365159b
-        
30b23e4
-             <os arch="i386" />
365159b
-        - ->
30b23e4
-      </and>
30b23e4
-    </condition>
365159b
-          -->
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.win32}">
30b23e4
-      <and>
30b23e4
-        <os family="windows" />
30b23e4
-        <os arch="x86" />
30b23e4
-      </and>
30b23e4
-    </condition>
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.win32-x86_64}">
30b23e4
-      <and>
30b23e4
-        <os family="windows" />
30b23e4
-        <or>
30b23e4
-          <os arch="x86_64" />
30b23e4
-          <os arch="amd64" />
30b23e4
-        </or>
30b23e4
-      </and>
30b23e4
-    </condition>
30b23e4
-    
30b23e4
-      property="platformArchive"
30b23e4
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.linux-x86_64}">
30b23e4
-      <and>
30b23e4
-        <os family="unix" />
30b23e4
-        <or>
30b23e4
-          <os arch="x86_64" />
30b23e4
-          <os arch="amd64" />
30b23e4
-        </or>
30b23e4
-      </and>
30b23e4
-    </condition>
365159b
+    <property name="platformArchive" value="${runtimeArchive}" />
365159b
 
365159b
     
365159b
       unless="platformArchive"
365159b
@@ -329,7 +258,7 @@
30b23e4
     
30b23e4
       dir="${platformLocation}"
30b23e4
       executable="tar">
30b23e4
-      <arg line="-xzf ${platformArchive}" />
30b23e4
+      <arg line="-xzf ../${platformArchive}" />
30b23e4
     </exec>
30b23e4
   </target>
Krzysztof Daniel 5dda4fa
 
365159b
@@ -886,6 +815,17 @@
30b23e4
           arg2="" />
30b23e4
       </not>
30b23e4
     </condition>
30b23e4
+
30b23e4
+    
30b23e4
+    <dirset id="test.plugin.folder" dir="${eclipse-home}/plugins/">
30b23e4
+      <include name="${testPlugin}_*" />
30b23e4
+    </dirset>
30b23e4
+    <property name="testPluginFolder" refid="test.plugin.folder" />
30b23e4
+    <echo>trying to find ${testPluginFolder}</echo>
30b23e4
+    <condition property="org.eclipse.swt.tests" value="${testPluginFolder}">
30b23e4
+      <equals arg1="${testPlugin}" arg2="org.eclipse.swt.tests"/>
30b23e4
+    </condition>
Krzysztof Daniel 294211a
+
30b23e4
     <antcall target="runSuite" />
30b23e4
     <antcall target="genResults" />
30b23e4
   </target>
365159b
@@ -1430,6 +1370,15 @@
30b23e4
         value="end longRunningTests" />
30b23e4
     </antcall>
30b23e4
 
30b23e4
+    
30b23e4
+    <mkdir dir="${results}/origXml" />
30b23e4
+    <xslt style="${repoLocation}/splitter.xsl" basedir="${results}/xml" includes="*.xml" destdir="${results}/origXml"/>
30b23e4
+    
30b23e4
+    <junitreport todir="${results}/xml" tofile="org.eclipse.sdk.tests.xml">
30b23e4
+      <fileset dir="${results}/origXml" includes="*.xml" />
30b23e4
+    </junitreport>
30b23e4
+    
30b23e4
+    <xslt style="${repoLocation}/JUNIT.XSL" basedir="${results}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${results}/html" />
30b23e4
   </target>
Krzysztof Daniel 49967cc
 
30b23e4
   
365159b
@@ -1471,7 +1420,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" />
365159b
@@ -1485,7 +1433,6 @@
30b23e4
     <antcall target="osgi" />
30b23e4
     <antcall target="coreresources" />
30b23e4
     <antcall target="equinoxp2" />
30b23e4
-    <antcall target="teamcvs" />
30b23e4
     <antcall target="jface" />
30b23e4
     <antcall target="ui" />
30b23e4
     <antcall target="uiperformance" />
365159b
@@ -1568,7 +1515,7 @@
30b23e4
     
30b23e4
       name="message"
30b23e4
       value="no message given by caller" />
30b23e4
-    <markTime msg="${message}" />
30b23e4
+    
30b23e4
   </target>
Krzysztof Daniel c3f4c27
 
30b23e4
   
03f33d1
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh.orig	2014-05-26 17:04:22.000000000 +0300
03f33d1
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh	2014-05-26 19:17:46.622004452 +0300
03f33d1
@@ -1,5 +1,72 @@
03f33d1
 #!/usr/bin/env bash
03f33d1
 
03f33d1
+function findXvncAndSetDisplay() {
03f33d1
+#   if [ ${headless} == 1 ]; then
03f33d1
+        # Try to find Xvnc
03f33d1
+        xvnc=
03f33d1
+        if [ -a /usr/bin/Xvnc ]
03f33d1
+        then
03f33d1
+            xvnc=/usr/bin/Xvnc
03f33d1
+            setupXvnc
03f33d1
+        else
03f33d1
+            if [ -a /usr/X11/bin/Xvnc ]
03f33d1
+            then
03f33d1
+                xvnc=/usr/X11/bin/Xvnc
03f33d1
+                setupXvnc
03f33d1
+            else
03f33d1
+                echo "Couldn't find Xvnc (/usr/bin/Xvnc or /usr/X11/bin/Xvnc).  Using DISPLAY=0:0"
03f33d1
+                DISPLAY=`$HOST`:0.0
03f33d1
+            fi
03f33d1
+        fi
03f33d1
+        export DISPLAY
03f33d1
+#   fi
03f33d1
+}
03f33d1
+
03f33d1
+function setupXvnc() {
03f33d1
+    # Pick a high display number.
03f33d1
+    port=`expr '(' $RANDOM '*' 9 / 32767 ')' + 58`
03f33d1
+    echo localhost > Xvnc.cfg
03f33d1
+    echo "Setting up Xvnc on port ${port} with password VNCpassword1"
03f33d1
+    $xvnc :$port -screen 1 1024x768x32 -auth Xvnc.cfg -localhost -PasswordFile eclipse-tests-vncpwd &> Xvnc.log &
03f33d1
+    Xvncpid=$!
03f33d1
+    DISPLAY=`$HOST`:$port
03f33d1
+}
03f33d1
+
03f33d1
+function setArch() {
03f33d1
+    if [ "x$buildArch" = "x" ]
03f33d1
+    then
03f33d1
+        if uname -m > /dev/null 2>&1; then
03f33d1
+            arch=`uname -m`
03f33d1
+        else
03f33d1
+            arch=`uname -p`
03f33d1
+        fi
03f33d1
+        # Massage arch for Eclipse-uname differences
03f33d1
+        case $arch in
03f33d1
+            i[0-9]*86)
03f33d1
+                arch=x86 ;;
03f33d1
+            ia64)
03f33d1
+                arch=ia64 ;;
03f33d1
+            ppc)
03f33d1
+                arch=ppc ;;
03f33d1
+            x86_64)
03f33d1
+                arch=x86_64 ;;
03f33d1
+            *)
03f33d1
+                echo "Unrecognized architecture:  $arch" 1>&2
03f33d1
+                exit 1 ;;
03f33d1
+        esac
03f33d1
+        echo >&2 "Architecture not specified.  Assuming host architecture: $arch"
03f33d1
+    fi
03f33d1
+}
03f33d1
+
03f33d1
+function cleanupXvnc() {
03f33d1
+    # Clean up if we used Xvnc
03f33d1
+    if [ -e Xvnc.cfg ]
03f33d1
+    then
03f33d1
+        kill $Xvncpid
03f33d1
+        rm Xvnc.cfg
03f33d1
+    fi
03f33d1
+}
03f33d1
+
03f33d1
 # This file should never exist or be needed for production machine,
03f33d1
 # but allows an easy way for a "local user" to provide this file
03f33d1
 # somewhere on the search path ($HOME/bin is common),
03f33d1
@@ -92,59 +159,31 @@ fi
03f33d1
 #necessary when invoking this script through rsh
03f33d1
 cd $dir
03f33d1
 
03f33d1
+    mkdir -p /tmp/eclipse-tests-directory
03f33d1
+    pushd /tmp/eclipse-tests-directory
03f33d1
+    rm -rf *
03f33d1
+    cp ${testslocation}/*.properties .
03f33d1
+    cp ${testslocation}/library.xml .
03f33d1
+
03f33d1
 if [ ! -r eclipse ]
03f33d1
 then
03f33d1
-  tar -xzf eclipse-SDK-*.tar.gz
03f33d1
-  # note, the file pattern to match, must not start with */plugins because there is no leading '/' in the zip file, since they are repos.
03f33d1
-  unzip -qq -o -C eclipse-junit-tests-*.zip plugins/org.eclipse.test* -d eclipse/dropins/
03f33d1
+  pushd @libdir@
03f33d1
+    tar czf /tmp/eclipse-tests-directory/eclipse-SDK-temp-linux-gtk-x86_64.tar.gz eclipse
03f33d1
+  popd
03f33d1
+  cp -rf @libdir@/eclipse eclipse
03f33d1
 fi
03f33d1
 
03f33d1
 # run tests
03f33d1
 launcher=`ls eclipse/plugins/org.eclipse.equinox.launcher_*.jar`
03f33d1
+findXvncAndSetDisplay
03f33d1
+setArch
03f33d1
+export ANT_HOME=@USR@/share/ant
03f33d1
+@USR@/bin/./ant \
03f33d1
+-file "${testslocation}/test.xml" $tests \
03f33d1
+-Dws=$ws -Dos=$os -Darch=$arch -Dos.arch=$arch \
03f33d1
+-DbuildId=v20120903-1347 -Dbasedir="/tmp/eclipse-tests-directory" \
03f33d1
+-DruntimeArchive="eclipse-SDK-temp-linux-gtk-x86_64.tar.gz" \
03f33d1
+-DrepoLocation="${testslocation}" \
03f33d1
+-Dorg.eclipse.test="3.3.100" \
03f33d1
+-D$installmode=true $properties
03f33d1
 
03f33d1
-echo " = = = Start list environment variables in effect = = = ="
03f33d1
-env
03f33d1
-echo " = = = End list environment variables in effect = = = ="
03f33d1
-
03f33d1
-# make sure there is a window manager running. See bug 379026
03f33d1
-# we should not have to, but may be a quirk/bug of hudson setup
03f33d1
-# assuming metacity attaches to "current" display by default (which should have
03f33d1
-# already been set by Hudson). We echo its value here just for extra reference/cross-checks.
03f33d1
-
a69dbca
-echo "Check if any window managers are running (xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm):"
a69dbca
-wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm" | grep -v egrep)
03f33d1
-echo "Window Manager processes: $wmpss"
03f33d1
-echo
03f33d1
-
03f33d1
-if [[ -z $wmpss ]]
03f33d1
-then
03f33d1
-  echo "No window managers processes found running, so will start metacity"
03f33d1
-  metacity --replace --sm-disable  &
03f33d1
-  METACITYPID=$!
03f33d1
-  echo $METACITYPID > epmetacity.pid
03f33d1
-else
03f33d1
-  echo "Existing window manager found running, so did not force start of metacity"
03f33d1
-fi
03f33d1
-
03f33d1
-echo
03f33d1
-
03f33d1
-# list out metacity processes so overtime we can see if they accumulate, or if killed automatically
03f33d1
-# when our process exits. If not automatic, should use epmetacity.pid to kill it when we are done.
03f33d1
-echo "Current metacity processes running (check for accumulation):"
03f33d1
-ps -ef | grep "metacity" | grep -v grep
03f33d1
-echo
03f33d1
-
03f33d1
-echo "Triple check if any window managers are running (at least metacity should be!):"
a69dbca
-wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm" | grep -v egrep)
03f33d1
-echo "Window Manager processes: $wmpss"
03f33d1
-echo
03f33d1
-echo "extdirprop in runtest: ${extdirprop}"
03f33d1
-echo "extdirproperty in runtest: ${extdirproperty}"
03f33d1
-
03f33d1
-# -Dtimeout=300000 "${ANT_OPTS}"
03f33d1
-if [[ ! -z "${extdirproperty}" ]]
03f33d1
-then
03f33d1
-  $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
03f33d1
-else
03f33d1
-  $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
03f33d1
-fi