From bff49ecb849181570bfcdd4dcc67b1cd9316899c Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Jul 22 2015 14:52:19 +0000 Subject: Fix some Eclipse Platform tests. - Fix JDT Feature path for TargetDefinitionPersistenceTests (PDE) - SimpleConfiguratorUtils should handle base == null for tests - Locate the compressed platform archive for p2 AbstractReconcilerTest --- diff --git a/eclipse-fix-tests.patch b/eclipse-fix-tests.patch new file mode 100644 index 0000000..6f45b07 --- /dev/null +++ b/eclipse-fix-tests.patch @@ -0,0 +1,33 @@ +diff --git eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java +index 945bafa..21dbc62 100644 +--- eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java ++++ eclipse.pde.ui/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/TargetDefinitionPersistenceTests.java +@@ -73,7 +73,7 @@ public class TargetDefinitionPersistenceTests extends TestCase { + */ + protected IPath getJdtFeatureLocation() { + IPath path = new Path(TargetPlatform.getDefaultLocation()); +- path = path.append("features"); ++ path = path.append("dropins").append("jdt").append("features"); + File dir = path.toFile(); + assertTrue("Missing features directory", dir.exists() && !dir.isFile()); + String[] files = dir.list(); +@@ -668,4 +668,4 @@ public class TargetDefinitionPersistenceTests extends TestCase { + assertTrue(iubc.getIncludeSource()); + } + +-} +\ No newline at end of file ++} +diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java +index f1f38f0..f9111e6 100644 +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AbstractReconcilerTest.java +@@ -217,7 +217,7 @@ public class AbstractReconcilerTest extends AbstractProvisioningTest { + File[] children = parent.listFiles(new FileFilter() { + public boolean accept(File pathname) { + String name = pathname.getName(); +- return name.startsWith("eclipse-platform-"); ++ return name.startsWith("eclipse-SDK-"); + } + }); + if (children != null && children.length == 1) diff --git a/eclipse-support-symlink-bundles.patch b/eclipse-support-symlink-bundles.patch index e0b75f6..7f71e5a 100644 --- a/eclipse-support-symlink-bundles.patch +++ b/eclipse-support-symlink-bundles.patch @@ -1,4 +1,4 @@ -From ca186bc5d8c8f0ecde78aab255c02eed414e3cb1 Mon Sep 17 00:00:00 2001 +From 0b0f725bdcf10918a25321a66c0abd4ddbbdd870 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Fri, 12 Sep 2014 10:27:14 -0400 Subject: [PATCH] Add support for regenerating bundle versions for symlinks. @@ -10,11 +10,11 @@ regenerated every time, in case a change has occured. Change-Id: Ifbe8efed2218a8a1250fd1ac59f0cdd6bdd5f309 --- .../META-INF/MANIFEST.MF | 1 + - .../utils/SimpleConfiguratorUtils.java | 104 ++++++++++++++++++++- - 2 files changed, 104 insertions(+), 1 deletion(-) + .../utils/SimpleConfiguratorUtils.java | 106 ++++++++++++++++++++- + 2 files changed, 106 insertions(+), 1 deletion(-) diff --git rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF -index 7f339b5..38b881c 100644 +index d88d0a6..07fe087 100644 --- rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF +++ rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF @@ -9,6 +9,7 @@ Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.Activator @@ -26,7 +26,7 @@ index 7f339b5..38b881c 100644 org.osgi.framework.namespace;version="1.0.0", org.osgi.framework.wiring;version="1.2.0", diff --git rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java -index ab69b88..bde62e0 100644 +index ab69b88..12e4d89 100644 --- rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java +++ rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java @@ -13,9 +13,15 @@ package org.eclipse.equinox.internal.simpleconfigurator.utils; @@ -46,21 +46,23 @@ index ab69b88..bde62e0 100644 public class SimpleConfiguratorUtils { -@@ -283,6 +289,13 @@ public class SimpleConfiguratorUtils { +@@ -283,6 +289,15 @@ public class SimpleConfiguratorUtils { String symbolicName = tok.nextToken().trim(); String version = tok.nextToken().trim(); URI location = parseLocation(tok.nextToken().trim()); -+ URI absLoc = URIUtil.append(base, location.toString()); -+ // Symbolic links may change outside Eclipse so regenerate proper bundle version. -+ if (Files.isSymbolicLink(Paths.get(absLoc))) { -+ // We can't depend on org.eclipse.equinox.internal.frameworkadmin.utils.Utils -+ Dictionary manifest = getOSGiManifest(absLoc); -+ version = manifest.get(Constants.BUNDLE_VERSION); ++ if (base != null) { ++ URI absLoc = URIUtil.append(base, location.toString()); ++ // Symbolic links may change outside Eclipse so regenerate proper bundle version. ++ if (Files.isSymbolicLink(Paths.get(absLoc))) { ++ // We can't depend on org.eclipse.equinox.internal.frameworkadmin.utils.Utils ++ Dictionary manifest = getOSGiManifest(absLoc); ++ version = manifest.get(Constants.BUNDLE_VERSION); ++ } + } int startLevel = Integer.parseInt(tok.nextToken().trim()); boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue(); BundleInfo result = new BundleInfo(symbolicName, version, location, startLevel, markedAsStarted); -@@ -421,4 +434,93 @@ public class SimpleConfiguratorUtils { +@@ -421,4 +436,93 @@ public class SimpleConfiguratorUtils { } return regularTimestamp; } @@ -155,5 +157,5 @@ index ab69b88..bde62e0 100644 + } } -- -1.9.3 +2.1.0 diff --git a/eclipse.spec b/eclipse.spec index ce5f478..5a4a655 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -37,7 +37,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_version} -Release: 8%{?dist} +Release: 9%{?dist} License: EPL URL: http://www.eclipse.org/ @@ -118,6 +118,7 @@ Patch21: disable-non-linux.patch Patch22: e9b5adb1.diff Patch23: %{pkg_name}-javaxannotation-import.patch +Patch24: %{pkg_name}-fix-tests.patch BuildRequires: rsync BuildRequires: make, gcc @@ -368,6 +369,7 @@ popd pushd eclipse.platform.ui %patch23 -p1 popd +%patch24 # Disable as many things as possible to make the build faster. We care only for Eclipse. %pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder @@ -823,6 +825,9 @@ echo 'echo "results in /tmp/eclipse-tests-directory/results/"' >> $RPM_BUILD_RO echo 'export testslocation="%{_javadir}/eclipse-testing/"' >> $RPM_BUILD_ROOT/%{_bindir}/%{pkg_name}-runEclipsePackageTests echo "pushd %{_javadir}/eclipse-testing;./runtests.sh -os linux -ws gtk -arch %{eclipse_arch} ; popd;" >> $RPM_BUILD_ROOT/%{_bindir}/%{pkg_name}-runEclipsePackageTests +# These properties are not correct and nested properties won't get resolved +sed -i '/org.eclipse.equinox.p2.reconciler.test/ d' $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/equinoxp2tests.properties + # Package testbundle-to-eclipse-test cp -r testbundle-to-eclipse-test $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/testbundle @@ -1094,6 +1099,11 @@ fi %{_libdir}/%{pkg_name}/plugins/org.eclipse.osgi.compatibility.state_* %changelog +* Wed Jul 22 2015 Roland Grunberg - 1:4.5.0-9 +- Fix JDT Feature path for TargetDefinitionPersistenceTests (PDE) +- SimpleConfiguratorUtils should handle base == null for tests +- Locate the compressed platform archive for p2 AbstractReconcilerTest + * Mon Jul 20 2015 Mat Booth - 1:4.5.0-8 - Disable tests for Eclipse 2.x style plug-in support that we don't ship