rpms/eclipse-cdt/devel eclipse-cdt-noLexerTests.patch, NONE, 1.1 eclipse-cdt-runtests.sh, NONE, 1.1 eclipse-cdt-testaggregation.patch, NONE, 1.1 eclipse-cdt.spec, 1.100, 1.101 fetch-cdt.sh, 1.2, 1.3
Andrew Overholt
overholt at fedoraproject.org
Wed Aug 27 20:15:12 UTC 2008
- Previous message (by thread): rpms/eclipse/devel eclipse-nowin32testfragment.patch, NONE, 1.1 eclipse-tests-libraryXml.patch, NONE, 1.1 .cvsignore, 1.49, 1.50 eclipse-mv-Platform.sh, 1.2, 1.3 eclipse-pde.build-add-package-build.patch, 1.8, 1.9 eclipse-pdebuild.sh, 1.6, 1.7 eclipse.spec, 1.584, 1.585 sources, 1.66, 1.67
- Next message (by thread): [pkgdb] fftw ownership updated
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: overholt
Update of /cvs/pkgs/rpms/eclipse-cdt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21335
Modified Files:
eclipse-cdt.spec fetch-cdt.sh
Added Files:
eclipse-cdt-noLexerTests.patch eclipse-cdt-runtests.sh
eclipse-cdt-testaggregation.patch
Log Message:
* Wed Aug 20 2008 Andrew Overholt <overholt at redhat.com> 5.0.0-4
- Add building and running of tests
- Remove LexerTests until 5.0.1
- Fix fetch script to use new location of PDE Build
eclipse-cdt-noLexerTests.patch:
--- NEW FILE eclipse-cdt-noLexerTests.patch ---
### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.core.tests
Index: parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java,v
retrieving revision 1.6
diff -u -r1.6 ScannerTestSuite.java
--- parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java 16 Jan 2008 16:43:48 -0000 1.6
+++ parser/org/eclipse/cdt/core/parser/tests/scanner/ScannerTestSuite.java 25 Aug 2008 15:36:46 -0000
@@ -17,7 +17,7 @@
public static Test suite() {
TestSuite suite= new ScannerTestSuite();
- suite.addTest(LexerTests.suite());
+// suite.addTest(LexerTests.suite());
suite.addTest(LocationMapTests.suite());
suite.addTest(PortedScannerTests.suite());
suite.addTest(PreprocessorTests.suite());
--- NEW FILE eclipse-cdt-runtests.sh ---
#!/bin/sh
function usage {
cat << _EOF_
usage: $0 [<options>]
Use PDE Build to build Eclipse features
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
_EOF_
}
debugTests=0
headless=1
while getopts âhgdbe:â OPTION
do
case $OPTION in
d)
debugTests=1
;;
e)
eclipseHome=$OPTARG
;;
g)
headless=0
;;
h)
usage
exit
;;
?)
usage
exit
;;
esac
done
testSuite=org.eclipse.cdt.testing
if [ -z $eclipseHome ]; then
eclipseHome=$(rpm --eval "%{_libdir}")/eclipse
fi
cdtTestPluginVersion=$(ls $eclipseHome/dropins/cdt-tests/plugins | \
grep ${testSuite}_ | sed "s/${testSuite}_//")
testDriver=$eclipseHome/dropins/cdt-tests/plugins/${testSuite}_${cdtTestPluginVersion}/test.xml
properties=$(pwd)/cdt-tests.properties
testPluginVersion=$(ls $eclipseHome/dropins/sdk/plugins | \
grep org.eclipse.test_ | sed 's/org.eclipse.test_//')
libraryXml=$eclipseHome/dropins/sdk/plugins/org.eclipse.test_$testPluginVersion/library.xml
results=$(pwd)/results-`date "+%Y%m%d%H%M%S"`
workspace=$(pwd)/workspace
datadir=$(pwd)/testDataDir
homedir=$(pwd)/home
testhome=$(pwd)/testhome
tmpresults=$(pwd)/tmpresults
os=linux
ws=gtk
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"
setXvnc() {
echo localhost > Xvnc.cfg
# Pick a high display number. Hopefully this isn't in use.
$xvnc :57 -screen 1 1024x768x32 -auth Xvnc.cfg &
Xvncpid=$!
DISPLAY=`$HOST`:57
}
rm $properties
rm -rf $workspace $datadir $homedir $tmpresults $testhome
mkdir -p $workspace $results $datadir $homedir $tmpresults $testhome
echo "data-dir=$datadir" >> $properties
echo "useEclipseExe=true" >> $properties
echo "junit-report-output=$results" >> $properties
echo "results=$results" >> $properties
echo "tmpresults=$tmpresults" >> $properties
echo "testhome=$testhome" >> $properties
echo "cdt-folder=$(pwd)/cdt_folder" >> $properties
echo "cdt-core-loc=$(pwd)/cdt_core_folder" >> $properties
echo "cdt-ui-loc=$(pwd)/cdt_ui_folder" >> $properties
echo "cdt-debug-ui-loc=$(pwd)/cdt_debug_ui_folder" >> $properties
echo "cdt-mbs-core-loc=$(pwd)/cdt_mbs_core_folder" >> $properties
echo "cdt-mbs-ui-loc=$(pwd)/cdt_mbs_ui_folder" >> $properties
if [ $debugTests -eq 1 ]; then
echo "extraVMargs=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=40000" >> $properties
fi
if [ $headless -eq 1 ]; then
# Try to find Xvnc
xvnc=
if [ -a /usr/bin/Xvnc ]
then
xvnc=/usr/bin/Xvnc
setXvnc
else
if [ -a /usr/X11/bin/Xvnc ]
then
xvnc=/usr/X11/bin/Xvnc
setXvnc
else
DISPLAY=`$HOST`:0.0
fi
fi
export DISPLAY
fi
$eclipseHome/eclipse \
-Duser.home=$homedir \
-data $workspace \
-application org.eclipse.ant.core.antRunner \
-file $testDriver \
-Declipse-home=$eclipseHome \
-Dlibrary-file=$libraryXml \
-Darch=$arch \
-Dos=$os \
-Dws=$ws \
-propertyfile $properties \
-logger org.apache.tools.ant.DefaultLogger \
-vmargs \
-Duser.home=$homedir
# Clean up if we used Xvnc
if [ -e Xvnc.cfg ]
then
kill $Xvncpid
rm Xvnc.cfg
fi
eclipse-cdt-testaggregation.patch:
--- NEW FILE eclipse-cdt-testaggregation.patch ---
diff -up ./org.eclipse.cdt.testing/test.xml.testaggregation ./org.eclipse.cdt.testing/test.xml
--- ./org.eclipse.cdt.testing/test.xml.testaggregation 2008-08-21 11:49:07.000000000 -0400
+++ ./org.eclipse.cdt.testing/test.xml 2008-08-21 11:53:39.000000000 -0400
@@ -14,10 +14,18 @@
</target>
<target name="run" depends="init,suite">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <mkdir dir="${results}/xml"/>
+ <mkdir dir="${results}/html"/>
+ <ant target="collect" antfile="${library-file}" dir="${results}/xml">
<property name="includes" value="org*.xml"/>
<property name="output-file" value="org.eclipse.cdt.testing.xml"/>
</ant>
+ <copy todir="${results}/xml">
+ <fileset dir="${results}">
+ <include name="**/org.eclipse.cdt*.xml"/>
+ </fileset>
+ </copy>
+ <style style="${eclipse-home}/dropins/sdk/plugins/org.eclipse.test_3.2.0/JUNIT.XSL" basedir="${results}/xml" destdir="${results}/html" />
</target>
<target name="cdt-core" depends="init">
Index: eclipse-cdt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-cdt/devel/eclipse-cdt.spec,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- eclipse-cdt.spec 11 Aug 2008 17:35:15 -0000 1.100
+++ eclipse-cdt.spec 27 Aug 2008 20:14:42 -0000 1.101
@@ -1,6 +1,8 @@
Epoch: 1
%define gcj_support 1
+%define run_tests 1
+%define ship_tests 1
%define major 5
%define minor 0
%define majmin %{major}.%{minor}
@@ -18,7 +20,7 @@
Summary: Eclipse C/C++ Development Tools (CDT) plugin
Name: eclipse-cdt
Version: %{majmin}.%{micro}
-Release: 3%{?dist}
+Release: 4%{?dist}
License: EPL and CPL
Group: Development/Tools
URL: http://www.eclipse.org/cdt
@@ -49,7 +51,10 @@
# binary patches are not possible, the gif is included as a source file.
Source3: %{name}-target_filter.gif.gz
-# Patch to remove tests from CDT build.xml.
+# Script to run the tests in Xvnc
+Source5: %{name}-runtests.sh
+
+# Don't run the tests as part of the build. We'll do this ourselves.
Patch4: %{name}-no-tests-%{version}.patch
## Patch to cppunit code to support double-clicking on file names, classes, and
@@ -69,6 +74,16 @@
# in glibc-headers package
Patch12: %{name}-openpty.patch
+# Add XML -> HTML generation after running tests
+Patch13: %{name}-testaggregation.patch
+
+# FIXME: investigate for 5.0.1
+#
+# There is a bug in this test that makes it not build. It looks like
+# it's fixed upstream in 5.0.1
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=130235
+Patch14: %{name}-noLexerTests.patch
+
BuildRequires: eclipse-pde
BuildRequires: eclipse-mylyn >= 3.0
%if %{gcj_support}
@@ -80,6 +95,9 @@
%else
BuildRequires: java-devel >= 1.4.2
%endif
+%if %{run_tests}
+BuildRequires: vnc-server
+%endif
Requires: gdb make gcc-c++ autoconf automake
Requires: eclipse-platform >= 1:3.4.0
@@ -112,6 +130,17 @@
%description sdk
Source for Eclipse CDT for use within Eclipse.
+%if %{ship_tests}
+%package tests
+Summary: Test suite for Eclipse C/C++ Development Tools (CDT)
+Group: Text Editors/Integrated Development Environments (IDE)
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: vnc-server
+
+%description tests
+Test suite for Eclipse C/C++ Development Tools (CDT).
+%endif
+
%prep
%setup -q -c
@@ -130,6 +159,14 @@
pushd results/plugins/org.eclipse.cdt.core.linux/library
%patch12 -p0
popd
+pushd results/plugins
+%patch13
+popd
+pushd results/plugins/org.eclipse.cdt.core.tests
+rm parser/org/eclipse/cdt/core/parser/tests/scanner/LexerTests.java
+%patch14
+popd
+
# Only build the sdk
offset=0;
for line in $(grep -no "value=.*platform" build.xml); do
@@ -182,7 +219,11 @@
# we wind up with some empty directories that we don't want.
#rm -r org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.linux/os
+mv org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.so \
+ org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.BAK
find -name \*.so | xargs rm -rf
+mv org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.BAK \
+ org.eclipse.cdt.releng/results/plugins/org.eclipse.cdt.core.tests/resources/testlib/x86/so.g/libtestlib_g.so
%build
export JAVA_HOME=%{java_home}
@@ -201,10 +242,10 @@
make JAVA_HOME="%{java_home}" ARCH=%{eclipse_arch} CC='gcc -D_GNU_SOURCE'
popd
-PDEBUILDVERSION=$(ls %{eclipse_base}/dropins/sdk/eclipse/plugins \
+PDEBUILDVERSION=$(ls %{eclipse_base}/dropins/sdk/plugins \
| grep org.eclipse.pde.build_ | \
sed 's/org.eclipse.pde.build_//')
-PDEDIR=%{eclipse_base}/dropins/sdk/eclipse/plugins/org.eclipse.pde.build_$PDEBUILDVERSION
+PDEDIR=%{eclipse_base}/dropins/sdk/plugins/org.eclipse.pde.build_$PDEBUILDVERSION
# Call eclipse headless to process CDT releng build scripts
pushd org.eclipse.cdt.releng
java -cp $SDK/startup.jar \
@@ -212,13 +253,12 @@
-DbuildId=%{build_id} \
-DbranchVersion=%{version} \
-DforceContextQualifier=%{build_id} \
--XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
--XX:CompileCommand="exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
--XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" \
--XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" \
+ -XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
+ -XX:CompileCommand="exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
+ -XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" \
+ -XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" \
org.eclipse.core.launcher.Main \
-application org.eclipse.ant.core.antRunner \
- -consolelog \
-DbuildId=%{build_id} \
-DbranchVersion=%{version} \
-DforceContextQualifier=%{build_id} \
@@ -237,10 +277,10 @@
pushd autotools
java -cp $SDK/startup.jar \
-Duser.home=$homedir \
--XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
--XX:CompileCommand="exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
--XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" \
--XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" \
+ -XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
+ -XX:CompileCommand="exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" \
+ -XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" \
+ -XX:CompileCommand="exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" \
org.eclipse.core.launcher.Main \
-application org.eclipse.ant.core.antRunner \
-Duser.home=$homedir \
@@ -250,7 +290,6 @@
-DbaseLocation=$SDK \
-Dbuilder=$PDEDIR/templates/package-build \
-f $PDEDIR/scripts/build.xml
-
popd
## Cppunit build
@@ -270,6 +309,10 @@
%install
rm -rf ${RPM_BUILD_ROOT}
+# Eclipse may try to write to the home directory.
+mkdir -p home
+homedir=$(cd home > /dev/null && pwd)
+
installDir=${RPM_BUILD_ROOT}/%{eclipse_base}/dropins/cdt
mylynInstallDir=${installDir}-mylyn
sdkInstallDir=${installDir}-sdk
@@ -291,9 +334,9 @@
rm $x
done
-## Autotools install
+# Autotools install
pushd autotools
-unzip -qq -d $installDir/eclipse build/rpmBuild/com.redhat.eclipse.cdt.autotools.feature.zip
+unzip -qq -d $installDir build/rpmBuild/com.redhat.eclipse.cdt.autotools.feature.zip
popd
mkdir -p $mylynInstallDir/eclipse/features $mylynInstallDir/eclipse/plugins
@@ -308,10 +351,8 @@
mv $installDir/eclipse/plugins/*sdk* $sdkInstallDir/eclipse/plugins
rm -rf $installDir/eclipse/features/org.eclipse.cdt.master_*
-rm -rf $installDir/eclipse/features/org.eclipse.cdt.testing_*
-rm -rf $installDir/eclipse/plugins/org.eclipse.cdt.testing_*
-rm -rf $installDir/eclipse/plugins/org.eclipse.test_*
rm -rf $installDir/eclipse/plugins/org.eclipse.ant.optional.junit_*
+rm -rf $installDir/eclipse/plugins/org.eclipse.test_*
## Cppunit install
#pushd cppunit
@@ -333,7 +374,9 @@
-publishArtifacts \
-append \
-artifactRepositoryName "CDT" \
--metadataRepositoryName "CDT"
+-metadataRepositoryName "CDT" \
+-vmargs \
+-Duser.home=$homedir
mv repo/content.xml .
rm -rf repo
@@ -354,7 +397,9 @@
-publishArtifacts \
-append \
-artifactRepositoryName "CDT Mylyn" \
--metadataRepositoryName "CDT Mylyn"
+-metadataRepositoryName "CDT Mylyn" \
+-vmargs \
+-Duser.home=$homedir
mv repo/content.xml .
rm -rf repo
@@ -375,16 +420,57 @@
-publishArtifacts \
-append \
-artifactRepositoryName "CDT SDK" \
--metadataRepositoryName "CDT SDK"
+-metadataRepositoryName "CDT SDK" \
+-vmargs \
+-Duser.home=$homedir
mv repo/content.xml .
rm -rf repo
popd
+mkdir -p ${installDir}-tests/plugins
+mkdir -p ${installDir}-tests/features
+mv ${installDir}/eclipse/plugins/*test* \
+ ${installDir}-tests/plugins
+mv ${installDir}/eclipse/features/*test* \
+ ${installDir}-tests/features
+for x in ${installDir}-tests/plugins/*.jar; do
+ dirname=`echo $x | sed -e 's:\\(.*\\)\\.jar:\\1:g'`
+ mkdir -p $dirname
+ unzip -q $x -d $dirname
+ rm $x
+done
+cp -p %{SOURCE5} ${installDir}-tests/runtests
+chmod 755 ${installDir}-tests/runtests
+%if ! %{ship_tests}
+%if ! %{run_tests}
+rm -rf ${installDir}-tests
+%endif
+%endif
+
%if %{gcj_support}
aot-compile-rpm
%endif
+%if %{run_tests}
+%check
+installDir=${RPM_BUILD_ROOT}/%{eclipse_base}/dropins/cdt
+# Copy the SDK to simulate real system
+rm -rf SDK.fortests
+cp -rpL %{eclipse_base} SDK.fortests
+# Remove any CDT or CDT tests we may have currently installed
+rm -rf SDK.fortests/dropins/cdt*
+cp -rpL $installDir SDK.fortests/dropins
+cp -rpL ${installDir}-tests SDK.fortests/dropins
+# FIXME: I'd like to simulate real life with something like this ...
+#chown -R root:root SDK.fortests
+SDK.fortests/dropins/cdt-tests/runtests -e $(pwd)/SDK.fortests
+w3m -cols 120 -dump results/html/org.eclipse.cdt.testing.html
+%if ! %{ship_tests}
+rm -rf ${installDir}-tests
+%endif
+%endif
+
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -417,7 +503,18 @@
%defattr(-,root,root)
%{eclipse_base}/dropins/cdt-mylyn
+%if %{ship_tests}
+%files tests
+%defattr(-,root,root)
+%{eclipse_base}/dropins/cdt-tests
+%endif
+
%changelog
+* Wed Aug 20 2008 Andrew Overholt <overholt at redhat.com> 5.0.0-4
+- Add building and running of tests
+- Remove LexerTests until 5.0.1
+- Fix fetch script to use new location of PDE Build
+
* Mon Aug 11 2008 Jeff Johnston <jjohnstn at redhat.com> 5.0.0-3
- Fix build id to be 200806171202.
Index: fetch-cdt.sh
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-cdt/devel/fetch-cdt.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- fetch-cdt.sh 8 Aug 2008 22:07:16 -0000 1.2
+++ fetch-cdt.sh 27 Aug 2008 20:14:42 -0000 1.3
@@ -19,7 +19,7 @@
# Remove copying of binary jar in build.xml. We remove this jar so this operation will fail.
sed --in-place -e'143,145d' build.xml
-PDEBUILDVERSION=$(ls $ECLIPSEBASE/dropins/sdk/eclipse/plugins | grep pde.build_ | sed 's/org.eclipse.pde.build_//')
+PDEBUILDVERSION=$(ls $ECLIPSEBASE/dropins/sdk/plugins | grep pde.build_ | sed 's/org.eclipse.pde.build_//')
java -cp /usr/lib/eclipse/startup.jar \
-Duser.home=../../home \
-XX:CompileCommand="exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" \
@@ -30,8 +30,10 @@
-Dpde.build.scripts=$ECLIPSEBASE/dropins/sdk/eclipse/plugins/org.eclipse.pde.build_$PDEBUILDVERSION/scripts \
-application org.eclipse.ant.core.antRunner \
-buildfile build.xml -DbaseLocation=$ECLIPSEBASE \
+ -Dpde.build.scripts=$ECLIPSEBASE/dropins/sdk/plugins/org.eclipse.pde.build_$PDEBUILDVERSION/scripts \
-DcdtTag=$CDTTAG \
-DdontUnzip=true fetch
+eclipse -nosplash -console
find . -name net.*.jar -exec rm {} \;
- Previous message (by thread): rpms/eclipse/devel eclipse-nowin32testfragment.patch, NONE, 1.1 eclipse-tests-libraryXml.patch, NONE, 1.1 .cvsignore, 1.49, 1.50 eclipse-mv-Platform.sh, 1.2, 1.3 eclipse-pde.build-add-package-build.patch, 1.8, 1.9 eclipse-pdebuild.sh, 1.6, 1.7 eclipse.spec, 1.584, 1.585 sources, 1.66, 1.67
- Next message (by thread): [pkgdb] fftw ownership updated
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list