[SCM] eclipse - Powerful IDE written in java - Debian package. branch, upstream, updated. f5939ee8c3d274123dfa5d9373b9af4a1262edb4
Benjamin Drung
bdrung-guest at alioth.debian.org
Mon Mar 15 20:34:39 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, upstream has been updated
via f5939ee8c3d274123dfa5d9373b9af4a1262edb4 (commit)
from 31a857f0b3c880f5d8e21f56296f1fab4d99eb9d (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
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 c304be0..c5395ab 100644
--- a/build.xml
+++ b/build.xml
@@ -632,49 +632,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: #" />
@@ -685,16 +643,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">
@@ -716,7 +669,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