diff --git a/.cvsignore b/.cvsignore
index 9a489f9..d68376b 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -4,3 +4,4 @@ ecf-filetransfer-v20080611-1715.tar.bz2
eclipse-sourceBuild-srcIncluded-3.4.zip
org.fedoraproject.ide.platform-3.4.0-1.zip
eclipse-ecj-gcj.tar.bz2
+eclipse-3.4.0-testframework.tar.bz2
diff --git a/eclipse-mv-Platform.sh b/eclipse-mv-Platform.sh
index ee66993..c872b1e 100644
--- a/eclipse-mv-Platform.sh
+++ b/eclipse-mv-Platform.sh
@@ -20,8 +20,6 @@ mv $baseDir/plugins/org.eclipse.team.cvs.ssh2_* plugins
mv $baseDir/plugins/org.eclipse.team.cvs.ui_* plugins
mv $baseDir/features/org.eclipse.equinox.p2.user.ui_* features
mv $baseDir/features/org.fedoraproject* features
-mv $baseDir/features/org.eclipse.equinox.p2.user.ui_* features
-mv $baseDir/features/org.fedoraproject* features
mv $baseDir/plugins/org.fedoraproject* plugins
mv $baseDir/plugins/*linux* plugins
mv $baseDir/plugins/com.jcraft.jsch_* plugins
diff --git a/eclipse-nowin32testfragment.patch b/eclipse-nowin32testfragment.patch
new file mode 100644
index 0000000..a280f6e
--- /dev/null
+++ b/eclipse-nowin32testfragment.patch
@@ -0,0 +1,18 @@
+diff -up ./org.eclipse.test-feature/feature.xml.nowin32 ./org.eclipse.test-feature/feature.xml
+--- ./org.eclipse.test-feature/feature.xml.nowin32 2008-08-27 10:14:56.000000000 -0400
++++ ./org.eclipse.test-feature/feature.xml 2008-08-27 10:15:04.000000000 -0400
+@@ -58,14 +58,6 @@
+ unpack="false"/>
+
+
+-
+- "
+ exit 1
+fi
@@ -21,6 +21,7 @@ diff -N templates/package-build/prepare-build-dir.sh
+
+SOURCEDIR=$1
+BUILDDIR=$2
++TESTING=$3
+
+echo "preparing files in $1 for buildfile generation ..."
+mkdir -p $BUILDDIR
@@ -48,37 +49,55 @@ diff -N templates/package-build/prepare-build-dir.sh
+
+# make symlinks for the features
+FEATURES=$(find $SOURCEDIR -name feature.xml)
-+for f in $FEATURES; do
-+ PROJECTDIR=$(dirname $f)
-+ PROJECTNAME=$(ant -Dbasedir=$PROJECTDIR -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
-+ if [ -z $PROJECTNAME ]; then
++find $SOURCEDIR -name feature.xml | while read f; do
++ PROJECTDIR=$(dirname "$f")
++ PROJECTNAME=$(ant -Dbasedir="$PROJECTDIR" -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
++ ERROR=""
++ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the feature id for $PROJECTDIR"
-+ exit 1
++ if [ $TESTING != true ]; then
++ exit 1
++ else
++ ERROR="yes"
++ fi
+ fi
+
-+ echo " making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
-+ ln -sf $PROJECTDIR $BUILDDIR/features/$PROJECTNAME
++ if [ "x$ERROR" != "xyes" ]; then
++ if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
++ echo " making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
++ ln -sf "$PROJECTDIR" $BUILDDIR/features/"$PROJECTNAME"
++ fi
++ fi
+done
+
+# make symlinks for plugins and fragments
+PLUGINDIRS=$(find $SOURCEDIR -name plugin.xml -o -name fragment.xml -o -name MANIFEST.MF | sed "s/plugin.xml//g" | sed "s/fragment.xml//g" | sed "s/META-INF\/MANIFEST.MF//" | sort | uniq)
-+for dir in $PLUGINDIRS; do
++find $SOURCEDIR -name plugin.xml -o -name fragment.xml -o -name MANIFEST.MF | sed "s/plugin.xml//g" | sed "s/fragment.xml//g" | sed "s/META-INF\/MANIFEST.MF//" | sort | uniq | while read dir; do
+ PROJECTNAME=""
-+ if [ -e $dir/META-INF/MANIFEST.MF ]; then
++ ERROR=""
++ if [ -e "$dir/META-INF/MANIFEST.MF" ]; then
+ PROJECTNAME=$(grep Bundle-SymbolicName $dir/META-INF/MANIFEST.MF | cut --delimiter=';' -f 1 | cut --delimiter=' ' -f 2)
-+ elif [ -e $dir/plugin.xml ]; then
++ elif [ -e "$dir/plugin.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/plugin-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
-+ elif [ -e $dir/fragment.xml ]; then
++ elif [ -e "$dir/fragment.xml" ]; then
+ PROJECTNAME=$(ant -Dbasedir=$dir -f $BUILDDIR/tmp/fragment-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
+ fi
+
-+ if [ -z $PROJECTNAME ]; then
++ if [ -z "$PROJECTNAME" ]; then
+ echo "ERROR: could not determine the plugin or fragment id for $dir"
-+ exit 1
++ if [ $TESTING != true ]; then
++ exit 1
++ else
++ ERROR="yes"
++ fi
+ fi
+
-+ echo " making symlink: $BUILDDIR/plugins/$PROJECTNAME -> $dir"
-+ ln -sf $dir $BUILDDIR/plugins/$PROJECTNAME
++ if [ "x$ERROR" != "xyes" ]; then
++ if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
++ echo " making symlink: $BUILDDIR/plugins/$PROJECTNAME -> $dir"
++ ln -sf $dir $BUILDDIR/plugins/"$PROJECTNAME"
++ fi
++ fi;
+
+done
+
@@ -180,7 +199,7 @@ diff -N templates/package-build/customTargets.xml
+ normally arranges the projects during the fetch stage. Since we aren't doing
+ the fetch stage, we have to manually arrange the files -->
+
-+
++
+
+
+
diff --git a/eclipse-pdebuild.sh b/eclipse-pdebuild.sh
index 715b9c5..d3b0763 100755
--- a/eclipse-pdebuild.sh
+++ b/eclipse-pdebuild.sh
@@ -113,9 +113,11 @@ verbose=0
dryRun=0
debugPlatform=0
orbitDepsDir=
+p2Generate=
+testing=false
# See above. r = dry run (used for testing)
-while getopts “hf:d:a:j:vrDo:” OPTION
+while getopts “hf:d:a:j:tvrDo:” OPTION
do
case $OPTION in
h)
@@ -134,6 +136,9 @@ do
j)
vmArgs=$OPTARG
;;
+ t)
+ testing=true
+ ;;
v)
verbose=1
;;
@@ -199,6 +204,16 @@ if [ $debugPlatform -eq 1 ]; then
debugPlatformArgs="-debug -consolelog"
fi
+if [ $testing != true ]; then
+ p2Generate="-Dp2.root.name=\"$featureName\" \
+-Dp2.root.version=\"$featureVersion\" \
+-Dgenerate.p2.metadata=true \
+-Dp2.metadata.repo=file:$buildDir/repo \
+-Dp2.artifact.repo=file:$buildDir/repo \
+-Dp2.flavor=tooling \
+-Dp2.publish.artifacts=true"
+fi
+
echo
echo "Starting build:"
@@ -214,13 +229,8 @@ $debugPlatformArgs \
-DbuildDirectory=$buildDir \
-Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_@PDEBUILDVERSION@/templates/package-build \
-DorbitDepsDir="$orbitDepsDir" \
--Dp2.root.name="$featureName" \
--Dp2.root.version="$featureVersion" \
--Dgenerate.p2.metadata=true \
--Dp2.metadata.repo=file:$buildDir/repo \
--Dp2.artifact.repo=file:$buildDir/repo \
--Dp2.flavor=tooling \
--Dp2.publish.artifacts=true \
+-Dtesting="$testing" \
+$p2Generate \
$additionalArgs \
-f $pdeBuildDir/scripts/build.xml \
-vmargs \
@@ -240,15 +250,8 @@ if [ $dryRun -ne 1 ]; then
-DbuildDirectory=$buildDir \
-Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_@PDEBUILDVERSION@/templates/package-build \
-DorbitDepsDir=$orbitDepsDir \
- -Dp2.root.name="$featureName" \
- -Dp2.root.version="$featureVersion" \
- -Dp2.metadata.repo.name="$featureName" \
- -Dp2.artifact.repo.version="$featureVersion" \
- -Dgenerate.p2.metadata=true \
- -Dp2.metadata.repo=file:$buildDir/repo \
- -Dp2.artifact.repo=file:$buildDir/repo \
- -Dp2.flavor=tooling \
- -Dp2.publish.artifacts=true \
+ -Dtesting="$testing" \
+ $p2Generate \
$additionalArgs \
-f $pdeBuildDir/scripts/build.xml \
-vmargs \
@@ -256,11 +259,13 @@ if [ $dryRun -ne 1 ]; then
$vmArgs
fi
-# Add content.xml into zip
-pushd $buildDir/rpmBuild
-unzip $featureId.zip
-rm $featureId.zip
-cp -p ../repo/content.xml eclipse
-zip -r $featureId.zip eclipse
-rm -rf eclipse
-popd
+if [ $testing != true ]; then
+ # Add content.xml into zip
+ pushd $buildDir/rpmBuild
+ unzip $featureId.zip
+ rm $featureId.zip
+ cp -p ../repo/content.xml eclipse
+ zip -r $featureId.zip eclipse
+ rm -rf eclipse
+ popd
+fi
diff --git a/eclipse-tests-libraryXml.patch b/eclipse-tests-libraryXml.patch
new file mode 100644
index 0000000..c98ffdc
--- /dev/null
+++ b/eclipse-tests-libraryXml.patch
@@ -0,0 +1,97 @@
+diff -up ./org.eclipse.test/library.xml.orig ./org.eclipse.test/library.xml
+--- ./org.eclipse.test/library.xml.orig 2008-08-27 15:10:17.000000000 -0400
++++ ./org.eclipse.test/library.xml 2008-08-27 15:11:16.000000000 -0400
+@@ -40,8 +40,10 @@
+
+
+
++
++
+
+-
++
+
+
+
+@@ -60,7 +62,11 @@
+
+
+
+-
++
++
++
++
++
+
+
+
+@@ -75,7 +81,7 @@
+
+
+
+-
++
+
+
+
+@@ -83,15 +89,29 @@
+
+
+
++
++
++
++
+
+
++
++
++
++
++
++
+
+
+
+
+
+
+-
++
++
++
++
++
+
+
+
+@@ -125,6 +145,8 @@
+
+
+
++
++
+
+
+
+@@ -138,7 +160,7 @@
+
+
+
+-
+@@ -158,8 +180,8 @@
+ includes - the names of the files to include
+ output-file - the name of the output file to produce
+ -->
+-
+-
++
++
+
+
+
diff --git a/eclipse.spec b/eclipse.spec
index d3f1f4d..d35025c 100644
--- a/eclipse.spec
+++ b/eclipse.spec
@@ -23,7 +23,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
-Release: 21%{?dist}
+Release: 22%{?dist}
License: EPL
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@@ -73,6 +73,18 @@ Source28: %{name}-mv-Platform.sh
# export -r eclipse_r34_1 eclipse-gcj
# tar cjf eclipse-ecj-gcj.tar.bz2 eclipse-gcj
Source29: %{name}-ecj-gcj.tar.bz2
+# Test feature and plugins
+# cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse co equinox-incubator/org.eclipse.equinox.initializer
+# mkdir %{name}-%{version}-testframework; cd %{name}-%{version}-testframework
+# cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse export -r R3_4 \
+# org.eclipse.test \
+# org.eclipse.test.performance \
+# org.eclipse.test-feature \
+# org.eclipse.ant.optional.junit
+# tar cjf %{name}-%{version}-testframework.tar.bz2 \
+# %{name}-%{version}-testframework
+# (generated 2008-08-27)
+Source30: %{name}-%{version}-testframework.tar.bz2
# Build swttools.jar before generation on 64-bit platforms.
# Build SWT native libraries
@@ -133,6 +145,13 @@ Patch37: %{name}-nojarsignatures.patch
#Patch39: %{name}-profilesync-e.o242632.patch
#Patch40: %{name}-profilesync-e.o242632-2.patch
+# Remove win32 fragment from test feature
+Patch41: %{name}-nowin32testfragment.patch
+
+# Some fixes for library.xml
+# FIXME: submit upstream
+Patch42: %{name}-tests-libraryXml.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ant
BuildRequires: jpackage-utils >= 0:1.5, make, gcc
@@ -629,6 +648,15 @@ pushd features/org.eclipse.ecf.filetransfer-feature
cp -p %{SOURCE26} feature.xml
cp -p %{SOURCE27} build.properties
popd
+popd
+
+# Test framework
+tar jxf %{SOURCE30}
+pushd %{name}-%{version}-testframework
+%patch41
+%patch42
+sed -i "s:/usr/lib/eclipse:%{_libdir}/%{name}:" org.eclipse.test/library.xml
+popd
%build
ORIGCLASSPATH=$CLASSPATH
@@ -701,6 +729,32 @@ java -cp $SDK/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
popd
+# Build the test framework
+pushd %{name}-%{version}-testframework
+mkdir -p build
+
+# The qualifier is what is in upstream's release:
+# http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/eclipse-test-framework-3.4.zip
+java -cp $SDK/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
+ -Duser.home=$homedir \
+ org.eclipse.core.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -Dtype=feature \
+ -Did=org.eclipse.test \
+ -DsourceDirectory=$(pwd) \
+ -DbaseLocation=$SDK \
+ -DforceContextQualifier=v20080507 \
+ -Dbuilder=$SDK/plugins/org.eclipse.pde.build_$PDEPLUGINVERSION/templates/package-build \
+ -f $SDK/plugins/org.eclipse.pde.build_$PDEPLUGINVERSION/scripts/build.xml
+
+unzip build/rpmBuild/org.eclipse.test.zip
+# These are already in the SDK
+rm eclipse/epl-v10.html eclipse/notice.html
+rm -rf plugins/org.junit*
+rm build/rpmBuild/org.eclipse.test.zip
+zip -r build/rpmBuild/org.eclipse.test.zip eclipse
+popd
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -738,6 +792,11 @@ unzip -d $RPM_BUILD_ROOT%{_libdir} \
rm -rf \
$sdkDir/features/org.eclipse.ecf.filetransfer_feature_*
+# Test framework
+unzip -d $RPM_BUILD_ROOT%{_libdir} \
+ %{name}-%{version}-testframework/build/rpmBuild/org.eclipse.test.zip
+mv $RPM_BUILD_ROOT%{_libdir}/eclipse/plugins/org.eclipse.test{_3.2.0,}
+
LAUNCHERVERSION=$(ls $sdkDir/plugins | grep equinox.launcher_ | sed 's/org.eclipse.equinox.launcher_//')
# Install the file initializer app
@@ -1458,6 +1517,11 @@ fi
%{_libdir}/%{name}/configuration/org.eclipse.equinox.source
%changelog
+* Wed Aug 27 2008 Andrew Overholt 3.4.0-22
+- Add test framework
+- Remove two duplicate lines in eclipse-mv-Platform.sh
+- Modify package-build and pdebuild so they can build the SDK tests
+
* Wed Aug 13 2008 Andrew Overholt 3.4.0-21
- Fix ecj-gcj (rhbz#458921)
diff --git a/sources b/sources
index 0fb8b0d..4a6ad75 100644
--- a/sources
+++ b/sources
@@ -4,3 +4,4 @@ e1313563c7e36aa46e33789a1386b815 eclipse-fileinitializerapp.tar.bz2
555c99aee06fc52d2ec03995b5ac0710 eclipse-sourceBuild-srcIncluded-3.4.zip
372361ae6f1355ec5cfb9a301ad690f5 org.fedoraproject.ide.platform-3.4.0-1.zip
43c2aa722a815c61706549d28786d134 eclipse-ecj-gcj.tar.bz2
+26ef7c2af793ec8b4ecffb62616483d1 eclipse-3.4.0-testframework.tar.bz2