Blob Blame History Raw
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig	2014-11-28 14:54:50.000000000 +0000
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml	2014-11-28 15:44:49.542304044 +0000
@@ -24,13 +24,6 @@
     has to move to "top of file" ... outer scope?
    <property file="${eclipseBuilderDir}/eclipse/buildConfigs/sdk.tests/testConfigs/${testPlatform}/testing.properties" />
 -->
-  <property
-    name="testingPropertiesfile"
-    value="testing.properties" />
-  <loadproperties>
-    <file file="${testingPropertiesfile}" />
-  </loadproperties>
-

   <!--default directory where test-eclipse will be installed-->
   <property
@@ -207,79 +207,8 @@
 
   <!--use an stable version of the director so that instability in the current build doesn't cause all the tests to fail -->
   <target name="setupPlatform">
-    <echo message="os.arch ${os.arch}" />
     <loadproperties srcfile="equinoxp2tests.properties" />
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.linux}">
-      <and>
-        <os family="unix" />
-        <not>
-          <or>
-            <or>
-              <os arch="x86_64" />
-              <os arch="amd64" />
-            </or>
-            <os family="mac" />
-          </or>
-        </not>
-      </and>
-    </condition>
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.macosx-x86_64}">
-      <and>
-        <os family="mac" />
-        <os family="unix" />
-        <or>
-          <os arch="x86_64" />
-          <os arch="amd64" />
-        </or>
-      </and>
-    </condition>
-  <!--
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.macosx}">
-      <and>
-        <os family="mac" />
-        <os family="unix" />
-        <!- - should not need, as long as x86_64 rules (above) comes first
-             <os arch="i386" />
-        - ->
-      </and>
-    </condition>
-          -->
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.win32}">
-      <and>
-        <os family="windows" />
-        <os arch="x86" />
-      </and>
-    </condition>
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.win32-x86_64}">
-      <and>
-        <os family="windows" />
-        <or>
-          <os arch="x86_64" />
-          <os arch="amd64" />
-        </or>
-      </and>
-    </condition>
-    <condition
-      property="platformArchive"
-      value="${org.eclipse.equinox.p2.reconciler.tests.lastrelease.platform.archive.linux-x86_64}">
-      <and>
-        <os family="unix" />
-        <or>
-          <os arch="x86_64" />
-          <os arch="amd64" />
-        </or>
-      </and>
-    </condition>
+    <property name="platformArchive" value="${runtimeArchive}" />
 
     <fail
       unless="platformArchive"
@@ -329,7 +258,7 @@
     <exec
       dir="${platformLocation}"
       executable="tar">
-      <arg line="-xzf ${platformArchive}" />
+      <arg line="-xzf ../${platformArchive}" />
     </exec>
   </target>
 
@@ -886,6 +815,17 @@
           arg2="" />
       </not>
     </condition>
+
+    <!-- swt needs this property to run tests -->
+    <dirset id="test.plugin.folder" dir="${eclipse-home}/plugins/">
+      <include name="${testPlugin}_*" />
+    </dirset>
+    <property name="testPluginFolder" refid="test.plugin.folder" />
+    <echo>trying to find ${testPluginFolder}</echo>
+    <condition property="org.eclipse.swt.tests" value="${testPluginFolder}">
+      <equals arg1="${testPlugin}" arg2="org.eclipse.swt.tests"/>
+    </condition>
+
     <antcall target="runSuite" />
     <antcall target="genResults" />
   </target>
@@ -1431,6 +1371,15 @@
         value="end longRunningTests" />
     </antcall>
 
+    <!-- Copy over the XML to generate a top-level report for all of the tests -->
+    <mkdir dir="${results}/origXml" />
+    <xslt style="${repoLocation}/splitter.xsl" basedir="${results}/xml" includes="*.xml" destdir="${results}/origXml"/>
+    <!-- Aggregate XML report files -->
+    <junitreport todir="${results}/xml" tofile="org.eclipse.sdk.tests.xml">
+      <fileset dir="${results}/origXml" includes="*.xml" />
+    </junitreport>
+    <!-- Generate top-level HTML report -->
+    <xslt style="${repoLocation}/JUNIT.XSL" basedir="${results}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${results}/html" />
   </target>
 
   <!--
@@ -1472,7 +1421,6 @@
     <antcall target="e4CssSwt" />
     <antcall target="e4UI" />
     <antcall target="equinoxds" />
-    <antcall target="equinoxp2discovery" />
     <antcall target="bidi" />
     <antcall target="ltkuirefactoringtests" />
     <antcall target="ltkcorerefactoringtests" />
@@ -1486,7 +1434,6 @@
     <antcall target="osgi" />
     <antcall target="coreresources" />
     <antcall target="equinoxp2" />
-    <antcall target="teamcvs" />
     <antcall target="jface" />
     <antcall target="ui" />
     <antcall target="uiperformance" />
@@ -1569,7 +1516,7 @@
     <property
       name="message"
       value="no message given by caller" />
-    <markTime msg="${message}" />
+    <!--markTime msg="${message}" /-->
   </target>
 
   <!--
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh.orig	2014-05-26 17:04:22.000000000 +0300
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/runtests.sh	2014-05-26 19:17:46.622004452 +0300
@@ -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),
@@ -32,35 +99,6 @@
 fi
 echo "jvm: $jvm"
 
-# On production, WORKSPACE is the 'hudson' workspace.
-# But, if running standalone, we'll assume "up two" from current directoy
-WORKSPACE=${WORKSPACE:-"../../.."};
-
-stableEclipseSDK=${stableEclipseSDK:-eclipse-SDK-4.5.1-linux-gtk-x86_64.tar.gz}
-stableEclipseInstallLocation=${stableEclipseInstallLocation:-${WORKSPACE}/org.eclipse.releng.basebuilder}
-
-# Note: test.xml will "reinstall" fresh install of what we are testing,
-# but we do need an install for initial launcher, and, later, need one for a
-# stable version of p2 director. For both purposes, we
-# we should use "old and stable" version,
-# which needs to be installed in ${stableEclipseInstallLocation}.
-# Note: for production tests, we use ${WORKSPACE}/org.eclipse.releng.basebuilder,
-# for historical reasons. The "true" (old) basebuilder does not have an 'eclipse' directory;
-# plugins is directly under org.eclipse.releng.basebuilder.
-if [[ ! -r ${stableEclipseInstallLocation} || ! -r "${stableEclipseInstallLocation}/eclipse" ]]
-then
-  mkdir -p ${stableEclipseInstallLocation}
-  tar -xf ${stableEclipseSDK} -C ${stableEclipseInstallLocation}
-fi
-
-launcher=$(find ${stableEclipseInstallLocation} -name "org.eclipse.equinox.launcher_*.jar" )
-if [ -z "${launcher}" ]
-then
-  echo "ERROR: launcher not found in ${stableEclipseInstallLocation}"
-  exit 1
-fi
-echo "launcher: $launcher"
-
 # define, but null out variables we expect on the command line
 # operating system, windowing system and architecture variables
 os=
@@ -135,59 +173,37 @@
 #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
+export JAVA_HOME=/usr/lib/jvm/java-1.8.0/jre
+setArch
+export ANT_HOME=@USR@/share/ant
 
 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|kwin|openbox|icewm):"
-wmpss=$(ps -ef | egrep -i "xfwm|twm|metacity|beryl|fluxbox|compiz|kwin|openbox|icewm" | 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|kwin|openbox|icewm" | 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
+@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.200" \
+-D$installmode=true $properties
+
--- eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml.orig	2016-02-17 00:50:39.910394827 +0000
+++ eclipse.platform.releng.tychoeclipsebuilder/eclipse-junit-tests/src/main/scripts/test.xml	2016-02-17 00:54:04.625884958 +0000
@@ -169,7 +169,9 @@
   <target
     name="setup-zip"
     description="Reinstall the test Eclipse installation if specified by user">
-    <delete dir="${install}" />
+    <delete removeNotFollowedSymlinks="true" failonerror="false">
+      <fileset dir="${install}" followsymlinks="false"/>
+    </delete>
     <mkdir dir="${install}" />
     <exec
       dir="."
@@ -187,7 +189,9 @@
     <property
       name="currentDir"
       value="${basedir}" />
-    <delete dir="${install}" />
+    <delete removeNotFollowedSymlinks="true" failonerror="false">
+      <fileset dir="${install}" followsymlinks="false"/>
+    </delete>
     <mkdir dir="${install}" />
     <exec
       dir="${install}"
@@ -233,7 +237,9 @@
   <target
     name="platform-zip"
     description="Reinstall the test Eclipse installation if specified by user">
-    <delete dir="${platformLocation}" />
+    <delete removeNotFollowedSymlinks="true" failonerror="false">
+      <fileset dir="${platformLocation}" followsymlinks="false"/>
+    </delete>
     <mkdir dir="${platformLocation}" />
     <exec
       dir="${platformLocation}"
@@ -246,7 +252,9 @@
   <target
     name="platform-tar.gz"
     description="Reinstall the test Eclipse installation if specified by user">
-    <delete dir="${platformLocation}" />
+    <delete removeNotFollowedSymlinks="true" failonerror="false">
+      <fileset dir="${platformLocation}" followsymlinks="false"/>
+    </delete>
     <mkdir dir="${platformLocation}" />
     <exec
       dir="${platformLocation}"