--- TMP/eclipse-junit-tests/src/main/scripts/test.xml.bak 2012-07-25 17:15:52.000000000 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/test.xml 2012-09-04 10:01:23.562816367 +0200 @@ -90,65 +90,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + --- TMP/eclipse-junit-tests/src/main/scripts/runtests.sh.bak 2012-07-25 17:15:52.000000000 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/runtests.sh 2012-09-04 10:02:38.616352712 +0200 @@ -1,4 +1,70 @@ #!/bin/sh +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 +} #set the DISPLAY for running tests on Linux #DISPLAY=`$HOST`:0.0;export DISPLAY @@ -66,24 +132,38 @@ #necessary when invoking this script through rsh cd $dir - +mkdir -p /tmp/eclipse-tests-directory +pushd /tmp/eclipse-tests-directory +rm -rf * # verify os, ws and arch values passed in are valid before running tests if [ "$os-$ws-$arch" = "linux-gtk-x86" ] || [ "$os-$ws-$arch" = "macosx-cocoa-ppc" ] || [ "$os-$ws-$arch" = "macosx-cocoa-x86" ] || [ "$os-$ws-$arch" = "aix-gtk-ppc" ] || [ "$os-$ws-$arch" = "aix-gtk-ppc64" ] || [ "$os-$ws-$arch" = "solaris-gtk-sparc" ] || [ "$os-$ws-$arch" = "solaris-gtk-x86" ] || [ "$os-$ws-$arch" = "linux-gtk-ppc64" ] || [ "$os-$ws-$arch" = "linux-gtk-ia64" ] || [ "$os-$ws-$arch" = "linux-gtk-x86_64" ] || [ "$os-$ws-$arch" = "hpux-gtk-ia64_32"] then - if [ ! -r eclipse ] - then - tar -xzf eclipse-SDK-*.tar.gz - unzip -qq -o -C eclipse-junit-tests-*.zip */plugins/org.eclipse.test* -d eclipse/dropins/ + if [ ! -r eclipse ] + then + pushd @libdir@ + tar czf /tmp/eclipse-tests-directory/eclipse-SDK-v20120903-1347-linux-gtk-x86_64.tar.gz eclipse + popd + cp -rf @libdir@/eclipse eclipse + unzip -o -C /usr/share/java/eclipse-tests/eclipse-junit-tests-*.zip */plugins/org.eclipse.test* -d eclipse/dropins/ fi +findXvncAndSetDisplay +setArch + # run tests -launcher=`ls eclipse/plugins/org.eclipse.equinox.launcher_*.jar` -$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 +eclipse -nosplash -data workspace -application org.eclipse.ant.core.antRunner \ +-file "/usr/share/java/eclipse-tests/test.xml" $tests \ +-Dws=$ws -Dos=$os -Darch=$arch -Dos.arch=$arch \ +-DbuildId=v20120903-1347 -Dbasedir="/tmp/eclipse-tests-directory" \ +-DruntimeArchive="eclipse-SDK-v20120903-1347-linux-gtk-x86_64.tar.gz" \ +-DrepoLocation="/usr/share/java/eclipse-tests" \ +-Dorg.eclipse.test="3.3.100" \ +-D$installmode=true $properties -logger org.apache.tools.ant.DefaultLogger +cleanupXvnc # display message to user if os, ws and arch are invalid else echo "The os, ws and arch values are either invalid or are an invalid combination" exit 1 fi - --- TMP/eclipse-junit-tests/src/main/scripts/test.xml.bak 2012-09-04 11:06:32.018103811 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/test.xml 2012-09-04 10:13:07.000000000 +0200 @@ -120,7 +120,7 @@ - + --- TMP/eclipse-junit-tests/src/main/scripts/test.xml.bak 2012-09-04 11:45:10.000000000 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/test.xml 2012-09-05 11:21:20.379946308 +0200 @@ -914,7 +914,7 @@ - + --- TMP/eclipse-junit-tests/src/main/scripts/test.xml.bak 2012-09-06 09:11:00.000000000 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/test.xml 2012-09-06 09:12:14.131863056 +0200 @@ -949,9 +949,9 @@ - + - + --- TMP/eclipse-junit-tests/src/main/scripts/test.xml.bak 2012-09-06 09:14:04.000000000 +0200 +++ TMP/eclipse-junit-tests/src/main/scripts/test.xml 2012-09-06 10:42:12.066027428 +0200 @@ -390,6 +390,16 @@ + + + + + + + trying to find ${testPluginFolder} + + +