[SCM] eclipse - Powerful IDE written in java - Debian package. branch, master, updated. 666591af41f0146205d45b860237f868dc46fc97

Benjamin Drung bdrung-guest at alioth.debian.org
Mon Mar 15 20:34:38 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, master has been updated
       via  666591af41f0146205d45b860237f868dc46fc97 (commit)
       via  f5939ee8c3d274123dfa5d9373b9af4a1262edb4 (commit)
      from  3c3a7f41a160fd041d35e11e0145f56b8b726d06 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 666591af41f0146205d45b860237f868dc46fc97
Merge: 3c3a7f41a160fd041d35e11e0145f56b8b726d06 f5939ee8c3d274123dfa5d9373b9af4a1262edb4
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Mon Mar 15 21:34:00 2010 +0100

    Merge branch 'upstream'

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog   |   11 +++++
 build.xml   |   57 ++------------------------
 runtests.sh |  127 +++++++++++++++++++++++++++++++++++++++-------------------
 3 files changed, 101 insertions(+), 94 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2844f5b..11a6843 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-03-12  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Remove unnecessary copying of test result XML files.
+
+2010-03-12  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Remove provision.tests task; do test provisioning in
+	runtests.sh.
+	* runtests.sh: Re-factor.  Clean test installation between runs of each
+	test suite. (Roland Grunberg)
+
 2010-03-10  Alexander Kurtakov  <akurtako at redhat.com>
 
 	* build.xml: Create swt symlinks on install.
diff --git a/build.xml b/build.xml
index 13b65b2..94c4f4a 100644
--- a/build.xml
+++ b/build.xml
@@ -684,49 +684,7 @@
 		<echo file="provision.sdk-stamp" />
 	</target>
 
-	<target name="provision.tests" depends="buildTests" unless="provision.tests.complete">
-		<mkdir dir="${buildDirectory}/testsInstallation" />
-		<copy todir="${buildDirectory}/testsInstallation/eclipse" overwrite="true">
-			<fileset dir="${buildDirectory}/installation" />
-		</copy>
-		<!-- To prevent contamination for those with test framework installed on their system -->
-		<exec executable="/bin/sed">
-			<arg value="-i" />
-			<arg value="/dropins/d" />
-			<arg value="${buildDirectory}/testsInstallation/eclipse/eclipse.ini" />
-		</exec>
-		<!--
-		<echo message="Installing test framework into:  ${buildDirectory}/testsInstallation"/>
-		<antcall target="run.director">
-			<param name="p2.director.installIU" value="org.eclipse.test.feature.group" />
-			<param name="p2.director.profile" value="SDKProfile" />
-			<param name="p2.director.install.path" value="${buildDirectory}/testsInstallation" />
-			<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
-			<param name="p2.os" value="linux" />
-			<param name="p2.ws" value="gtk" />
-			<param name="p2.arch" value="${buildArch}" />
-			<param name="p2.repo" value="${testsBuildDirectory}/buildRepo" />
-		</antcall>
--->
-		<echo message="Installing SDK tests into:  ${buildDirectory}/testsInstallation" />
-		<antcall target="run.installed.director">
-			<param name="directorToRun" value="${buildDirectory}/testsInstallation/eclipse/eclipse" />
-			<param name="p2.director.installIU" value="org.eclipse.sdk.tests.feature.group" />
-			<param name="p2.director.profile" value="SDKProfile" />
-			<param name="p2.director.install.path" value="${buildDirectory}/testsInstallation/eclipse" />
-			<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
-			<param name="p2.os" value="linux" />
-			<param name="p2.ws" value="gtk" />
-			<param name="p2.arch" value="${buildArch}" />
-			<param name="p2.repo" value="${testsBuildDirectory}/buildRepo" />
-		</antcall>
-		<copy preservelastmodified="true" file="${basedir}/junitHelper.xml" todir="${buildDirectory}/testsInstallation" />
-		<copy preservelastmodified="true" file="${basedir}/runtests.sh" todir="${buildDirectory}/testsInstallation" />
-		<copy preservelastmodified="true" file="${basedir}/eclipse-tests-vncpwd" todir="${buildDirectory}/testsInstallation" />
-		<echo file="provision.tests-stamp" />
-	</target>
-
-	<target name="runTests" depends="provision.tests">
+	<target name="runTests" depends="buildTests">
 		<echo message="###################################################################" />
 		<echo message="#                                                                 #" />
 		<echo message="#             Please post and discuss results here:               #" />
@@ -737,16 +695,11 @@
 		<tstamp>
 			<format property="timestamp" pattern="yyyyMMddHHmmss" />
 		</tstamp>
-		<chmod perm="ugo+rx" file="${buildDirectory}/testsInstallation/runtests.sh" />
-		<exec executable="${buildDirectory}/testsInstallation/runtests.sh" dir="${buildDirectory}/testsInstallation">
+		<chmod perm="ugo+rx" file="${basedir}/runtests.sh" />
+		<exec executable="${basedir}/runtests.sh" dir="${basedir}">
 			<arg value="-t${timestamp}" />
 		</exec>
-		<property name="testResultDir" value="${basedir}/testResults-${timestamp}" />
-		<copy failonerror="false" todir="${testResultDir}">
-			<fileset dir="${buildDirectory}/testsInstallation/results-${timestamp}">
-				<include name="**/*" />
-			</fileset>
-		</copy>
+		<property name="testResultDir" value="${basedir}/tests_${timestamp}/results" />
 		<!-- Copy over the XML to generate a top-level report for all of the tests -->
 		<mkdir dir="${testResultDir}/origXml" />
 		<copy failonerror="false" todir="${testResultDir}/origXml">
@@ -768,7 +721,7 @@
 			<fileset dir="${testResultDir}/origXml" includes="*.xml" />
 		</junitreport>
 		<!-- Generate top-level HTML report -->
-		<xslt style="${buildDirectory}/testsInstallation/eclipse/plugins/org.eclipse.test_3.2.0/JUNIT.XSL" basedir="${testResultDir}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${testResultDir}/html" />
+		<xslt style="${basedir}/tests_${timestamp}/installation/plugins/org.eclipse.test_3.2.0/JUNIT.XSL" basedir="${testResultDir}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${testResultDir}/html" />
 	</target>
 
 	<target name="run.director">
diff --git a/runtests.sh b/runtests.sh
index 0d9bc5c..ba2280d 100644
--- a/runtests.sh
+++ b/runtests.sh
@@ -11,7 +11,6 @@ Run Eclipse SDK tests
 
 Optional arguments:
    -h      Show this help message
-   -e      Eclipse SDK location
    -g      Don't run the tests headless
    -d      Allow remote connection to test runs' JVM
    -t      Timestamp string with which to tag the results
@@ -73,17 +72,28 @@ function init() {
 	# Defaults
 	debugTests=0
 	headless=1
-	eclipseHome=$(pwd)/eclipse
-	cp -rp ${eclipseHome}/configuration{,.knowngood}
 	testFramework=org.eclipse.test_3.2.0
-	libraryXml=${eclipseHome}/plugins/${testFramework}/library.xml
 	if [ -z ${timestamp} ]; then
 		timestamp=$(date "+%Y%m%d%H%M%S")
 	fi
-	results=$(pwd)/results-${timestamp}
-	datadir=$(pwd)/testDataDir
-	homedir=$(pwd)/home
-	testhome=$(pwd)/testhome
+	label=$(grep label build.properties | sed s/label=//)
+	testsRepo=$(pwd)/testsBuild/eclipse-sdktests-${label}-src/buildRepo/
+
+	testsParent=$(pwd)/tests_${timestamp}
+        mkdir -p ${testsParent}
+        cp -rp $(pwd)/build/eclipse-${label}-src/installation ${testsParent}/testsinstallation.clean
+	cleanInstall=${testsParent}/testsinstallation.clean
+        workspace=${testsParent}/workspace
+
+	eclipseHome=${cleanInstall}
+        installTestFramework
+
+	eclipseHome=${testsParent}/installation
+
+	results=${testsParent}/results
+	datadir=${testsParent}/testDataDir
+	homedir=${testsParent}/home
+	testhome=${testsParent}/testhome
 
 	rm -rf $datadir $homedir $testhome
 	mkdir -p $datadir $homedir $testhome $results/{xml,logs,html}
@@ -161,10 +171,12 @@ function setArch() {
 }
 
 function runTestSuite() {
-	$eclipseHome/eclipse \
+	libraryXml=${eclipseHome}/plugins/${testFramework}/library.xml
+
+	${eclipseHome}/eclipse \
 	-application org.eclipse.ant.core.antRunner \
 	-file $testDriver \
-	-Declipse-home=$eclipseHome \
+	-Declipse-home=${eclipseHome} \
 	-Dos=linux \
 	-Dws=gtk \
 	-Darch=${arch} \
@@ -179,8 +191,7 @@ function runTestSuite() {
 }
 
 function cleanAfterTestSuite() {
-	rm -rf ${datadir} ${homedir} ${testhome} ${eclipseHome}/configuration
-	cp -rp ${eclipseHome}/configuration{.knowngood,}
+	rm -rf ${datadir} ${homedir} ${testhome}
 	mkdir -p ${datadir} ${homedir} ${testhome}
 }
 
@@ -208,35 +219,70 @@ function cleanupXvnc() {
 	fi
 }
 
-function findAndRunTestPlugins() {
-	for plugin in $(ls ${eclipseHome}/plugins | grep org.eclipse.*tests); do
-		if [ ! $(echo ${plugin} | grep .source_) ]; then
-			pluginName=$(echo ${plugin} | sed "s/_.*//")
-			pluginVersion=$(echo ${plugin} | sed "s/${pluginName}_//")
-			echo ${testPluginsToRun} | grep -q ${pluginName}
-			if [ $? == 0 ]; then
-				echo "Running ${pluginName} (${pluginVersion})"
-				testDriver="${eclipseHome}/plugins/${pluginName}_${pluginVersion}/test.xml"
-				if [ ${pluginName} == "org.eclipse.swt.tests" ]; then
-					echo "plugin-path=${eclipseHome}/plugins/${pluginName}_${pluginVersion}" >> ${properties}
-				fi
-				runTestSuite
-				cleanAfterTestSuite
-				mv ${results}/*.txt ${results}/logs
-				xmlDir=${results}/tmpXml
-				mkdir -p ${xmlDir}
-				mv ${results}/*.xml ${xmlDir}
-				genHtml
-				mv ${xmlDir}/* ${results}/xml
-				rm -rf ${xmlDir}
-				if [ ${pluginName} == "org.eclipse.swt.tests" ]; then
-					sed -i "/plugin-path/d" ${properties}
-				fi
-			fi
-		fi
+function runTestPlugins() {
+	for plugin in $testPluginsToRun; do
+		cleanAndSetup
+		installTestPlugin
+		rm -rf ${workspace}
+		mkdir -p ${workspace}
+		runTestPlugin
 	done
 }
 
+function cleanAndSetup() {
+  rm -rf ${eclipseHome}
+  rm -rf ${workspace}
+
+  cp -rp ${cleanInstall} ${eclipseHome}
+  workspace=${testsParent}/workspace
+}
+
+function installTestPlugin() {
+  IUtoInstall=${plugin}
+  installIU
+}
+
+function installIU() {
+  pushd ${eclipseHome} > /dev/null
+    ./eclipse \
+      -nosplash \
+      -application org.eclipse.equinox.p2.director \
+      -data ${workspace} \
+      -consoleLog \
+      -flavor tooling \
+      -installIU ${IUtoInstall} \
+      -profileProperties org.eclipse.update.install.features=true \
+      -metadatarepository file:${testsRepo} \
+      -artifactrepository file:${testsRepo}
+  popd > /dev/null
+}
+
+function installTestFramework() {
+  IUtoInstall=org.eclipse.test.feature.group
+  installIU
+}
+
+function runTestPlugin() {
+	pluginVersion=$(ls ${eclipseHome}/plugins | grep ${plugin}_ | sed s/${plugin}_//)
+	echo "Running ${plugin} (${pluginVersion})"
+	testDriver="${eclipseHome}/plugins/${plugin}_${pluginVersion}/test.xml"
+	if [ ${plugin} == "org.eclipse.swt.tests" ]; then
+		echo "plugin-path=${eclipseHome}/plugins/${plugin}_${pluginVersion}" >> ${properties}
+	fi
+	runTestSuite
+	cleanAfterTestSuite
+	mv ${results}/*.txt ${results}/logs
+	xmlDir=${results}/tmpXml
+	mkdir -p ${xmlDir}
+	mv ${results}/*.xml ${xmlDir}
+	genHtml
+	mv ${xmlDir}/* ${results}/xml
+	rm -rf ${xmlDir}
+	if [ ${plugin} == "org.eclipse.swt.tests" ]; then
+		sed -i "/plugin-path/d" ${properties}
+	fi
+}
+
 function genHtml() {
 	ant -Declipse-home=${eclipseHome} -Dresults=${results} -DxmlDir=${xmlDir} -f junitHelper.xml
 }
@@ -248,9 +294,6 @@ do
          d)
              debugTests=1
              ;;
-         e)
-             eclipseHome=$OPTARG
-             ;;
          g)
              headless=0
              ;;
@@ -267,5 +310,5 @@ done
 init
 findXvncAndSetDisplay
 setArch
-findAndRunTestPlugins
+runTestPlugins
 cleanupXvnc


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list