Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Daniel2013-12-13 10:35:29 -0500
committerKrzysztof Daniel2013-12-17 07:03:36 -0500
commit39da65192fec835fafe75c0f863a63757b59f2dd (patch)
treede0b0b83fc920afcd0e77f1e0b6dcd8113ae6c29 /bundles/org.eclipse.equinox.p2.tests
parentefa5443d0d66120dfb2f8f80db365c02b6dbd6d8 (diff)
downloadrt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.tar.gz
rt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.tar.xz
rt.equinox.p2-39da65192fec835fafe75c0f863a63757b59f2dd.zip
bug 421935: Extend simpleconfigurator to read .info files from many
locations. Locations should be passed to the simpleconfigurator via the p2.fragments java property and separated using ",". Each location may contain multiple fragments. A fragment consist of a directory shaped as: + extension-parent-dir + extension.info + artifacts.xml + content.xml + plugins/* + features/* Or a link file (f.e. extension.link) which contains a single java property ("link") pointing to another location in the system. The *.info file may contain relative or absolute paths to plugins. Relative paths will be resolved against the extension root. The simpleconfigurator, if configured with extensions, will attempt to load them all at startup, duplicates will be removed. It is the responsibility of the fragment provider to ensure that all fragments will lead to a valid Eclipse installation, AS NO VALIDATION OR INTEGRITY CHECK IS PERFORMED. Bundles that can't be loaded due to unsatisfied constraints will result in errors handled by OSGi (written to the .log in the configuration area). Change-Id: Ib2689c072f3149b29ed77797d7df7b209d9abde7 Signed-off-by: Krzysztof Daniel <kdaniel@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtended.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtendedConfigured.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtended.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtendedConfigured.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtended.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtendedConfigured.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTests.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedConfiguredTest.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedTest.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/artifacts.xml22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/content.xml33
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_1.0.0/feature.xml30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_2.0.0/feature.xml30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_1.0.0/feature.xml26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_2.0.0/feature.xml26
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/directoryBased.jarbin0 -> 871 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/myBundle_2.0.0.jarbin0 -> 361 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_1.0.0.jarbin0 -> 377 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_2.0.0.jarbin0 -> 379 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/zzz_1.0.0.jarbin0 -> 411 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.info1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.profile28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/brokenExtension/.gitignore0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extension2/extension2.info2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension1/extension1.info2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension2.link1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/artifacts.xml24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/content.xml32
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/extension3.info1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/plugins/aBundle_1.0.0.jarbin0 -> 319 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/main/bundles.info2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorTest/extension/extension.info1
36 files changed, 775 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
index 3b61b8e75..fae517eaf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Red Hat, Inc. - tests
+ * Red Hat, Inc. - fragment support
*******************************************************************************/
package org.eclipse.equinox.p2.tests.simpleconfigurator;
@@ -70,13 +70,14 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
}
}
+ @SuppressWarnings("deprecation")
protected BundleContext startFramework(File bundleInfo, File[] additionalBundle) {
try {
File simpleConfiguratorBundle = getLocation("org.eclipse.equinox.simpleconfigurator");
File osgiBundleLoc = getLocation("org.eclipse.osgi");
// for test purposes create an install.area and configuration.area located in the local bundle data area.
- File installarea = TestActivator.context.getDataFile(getName() + "/eclipse");
+ File installarea = TestActivator.context.getDataFile(getName() + "/" + System.currentTimeMillis() + "/eclipse");
File configarea = new File(installarea, "configuration");
URL osgiBundle = osgiBundleLoc.toURI().toURL();
//if we have framework in workspace need to add the bin directory
@@ -188,4 +189,13 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
};
return directory.listFiles(bundleFilter);
}
+
+ public void readOnly(File f, boolean readonly) {
+ if (f.isDirectory()) {
+ for (File f2 : f.listFiles()) {
+ readOnly(f2, readonly);
+ }
+ }
+ f.setWritable(!readonly);
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
index b5a8f4998..3c3aed777 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Red Hat, Inc. - tests
+ * Red Hat, Inc. - fragment support
*******************************************************************************/
package org.eclipse.equinox.p2.tests.simpleconfigurator;
@@ -21,8 +21,8 @@ public class BundlesTxtTest extends AbstractSimpleConfiguratorTest {
BUNDLE_JAR_DIRECTORY = "simpleConfiguratorTest/bundlesTxt";
}
- private File[] jars = null;
- private File bundleInfo = null;
+ protected File[] jars = null;
+ protected File bundleInfo = null;
protected void setUp() throws Exception {
super.setUp();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtended.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtended.java
new file mode 100644
index 000000000..06d6e8577
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtended.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+
+public class BundlesTxtTestExtended extends BundlesTxtTest {
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // enable extended mode
+ Activator.EXTENDED = true;
+ System.setProperty("p2.fragments", "true");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Activator.EXTENDED = false;
+ System.setProperty("p2.fragments", "false");
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtendedConfigured.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtendedConfigured.java
new file mode 100644
index 000000000..b6a49dc81
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTestExtendedConfigured.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import java.io.File;
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+import org.osgi.framework.BundleContext;
+
+public class BundlesTxtTestExtendedConfigured extends BundlesTxtTestExtended {
+
+ private File testData;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ //subdir extension will be loaded
+ testData = getTempFolder();
+ copy("preparing testData", getTestData("simpleconfigurator extensions", "testData/simpleConfiguratorTest"), testData);
+ Activator.EXTENSIONS = testData.toString();
+ System.setProperty("p2.fragments", Activator.EXTENSIONS);
+ readOnly(testData, true);
+ }
+
+ @Override
+ public void testBundlesTxt() throws Exception {
+ BundleContext equinoxContext = startFramework(bundleInfo, null);
+ assertJarsInstalled(jars, equinoxContext.getBundles());
+ /**
+ * 3 = one extension + osgi + simpleconfigurator
+ */
+ assertEquals(jars.length + 3, equinoxContext.getBundles().length);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ Activator.EXTENSIONS = null;
+ readOnly(testData, false);
+ testData.delete();
+ super.tearDown();
+ System.setProperty("p2.fragments", "");
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtended.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtended.java
new file mode 100644
index 000000000..d53531f5b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtended.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+
+public class NonExclusiveModeExtended extends NonExclusiveMode {
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // enable extended mode
+ Activator.EXTENDED = true;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Activator.EXTENDED = false;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtendedConfigured.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtendedConfigured.java
new file mode 100644
index 000000000..bf411f654
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/NonExclusiveModeExtendedConfigured.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import java.io.File;
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+
+public class NonExclusiveModeExtendedConfigured extends NonExclusiveModeExtended {
+
+ private File testData;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testData = getTempFolder();
+ copy("preparing testData", getTestData("simpleconfigurator extensions", "testData/simpleConfiguratorExtendedTest/extensions"), testData);
+ Activator.EXTENSIONS = testData.toString();
+ readOnly(testData, true);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ Activator.EXTENSIONS = null;
+ readOnly(testData, false);
+ testData.delete();
+ super.tearDown();
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
index 120acfc1f..c32dcdb6b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTest.java
@@ -7,6 +7,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
* Ericsson AB - ongoing development
+ * Red Hat, Inc. - fragment support
******************************************************************************/
package org.eclipse.equinox.p2.tests.simpleconfigurator;
@@ -19,12 +20,12 @@ import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class SimpleConfiguratorTest extends AbstractProvisioningTest {
- private URL relativeURL;
- private File userConfiguration;
- private File masterConfguration;
- private URL[] sharedConfiguration = new URL[2];
- private URL[] localConfiguration = new URL[1];
- private SimpleConfiguratorImpl configurator;
+ protected URL relativeURL;
+ protected File userConfiguration;
+ protected File masterConfguration;
+ protected URL[] sharedConfiguration = new URL[2];
+ protected URL[] localConfiguration = new URL[1];
+ protected SimpleConfiguratorImpl configurator;
public void setUp() throws Exception {
relativeURL = new URL("file://bundles.info");
@@ -48,7 +49,7 @@ public class SimpleConfiguratorTest extends AbstractProvisioningTest {
return new SimpleConfiguratorImpl(null, null);
}
- private void storeTimestamp(long timestamp) throws IOException {
+ protected void storeTimestamp(long timestamp) throws IOException {
File f = new File(userConfiguration.getParent(), SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO);
Properties p = new Properties();
p.put(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP, "" + timestamp);
@@ -62,7 +63,7 @@ public class SimpleConfiguratorTest extends AbstractProvisioningTest {
super.tearDown();
}
- private void assertIsPropertySet(boolean set) {
+ protected void assertIsPropertySet(boolean set) {
assertEquals(set, Boolean.TRUE.toString().equalsIgnoreCase(System.getProperty(SimpleConfiguratorImpl.PROP_IGNORE_USER_CONFIGURATION)));
}
@@ -95,7 +96,8 @@ public class SimpleConfiguratorTest extends AbstractProvisioningTest {
assertIsPropertySet(true);
}
- //master not modified -> pick user
+ //master not modified -> extension configured
+ //on adding extension master must be selected in order to create new profile with extensions!
public void testSharedConfigurationMasterUnmodified() throws IOException {
storeTimestamp(new File(masterConfguration, relativeURL.getFile()).lastModified());
assertEquals(sharedConfiguration[0], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtended.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtended.java
new file mode 100644
index 000000000..67740c94a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtended.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2012,2013 Red Hat, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ * Ericsson AB - ongoing development
+ ******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+
+public class SimpleConfiguratorTestExtended extends SimpleConfiguratorTest {
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // enable extended mode
+ Activator.EXTENDED = true;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Activator.EXTENDED = false;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtendedConfigured.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtendedConfigured.java
new file mode 100644
index 000000000..5de86bea9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtendedConfigured.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2012,2013 Red Hat, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ * Ericsson AB - ongoing development
+ ******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
+
+public class SimpleConfiguratorTestExtendedConfigured extends SimpleConfiguratorTestExtended {
+
+ private File parentFolder;
+ private File ext1Info;
+ private File ext1Parent;
+ private File ext3Info;
+ private File ext3Parent;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ parentFolder = new File(getTempFolder(), "extension");
+ ext1Parent = new File(parentFolder, "ext1");
+ ext1Parent.mkdirs();
+ ext1Info = new File(ext1Parent, "ext1.info");
+ ext1Info.createNewFile();
+ ext3Parent = new File(parentFolder, "ext3");
+ ext3Parent.mkdirs();
+ ext3Info = new File(ext3Parent, "ext3.info");
+ ext3Info.createNewFile();
+ ext1Info.setLastModified(System.currentTimeMillis() + 1000);
+ ext1Parent.setWritable(false);
+ ext3Info.setLastModified(System.currentTimeMillis() + 1000);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ Activator.EXTENSIONS = null;
+ ext1Parent.setWritable(true);
+ super.tearDown();
+ }
+
+ public void testWriteableExtension() throws FileNotFoundException, IOException, URISyntaxException {
+ Activator.EXTENSIONS = parentFolder.toString();
+ ArrayList<File> infoFiles = SimpleConfiguratorUtils.getInfoFiles();
+ assertEquals("only read-only info file should be considered", 1, infoFiles.size());
+ // ext1 is expected because ext3 is writeable
+ assertEquals(ext1Info.getName(), infoFiles.get(0).getName());
+ }
+
+ public void testExtensionAdded() throws IOException {
+
+ storeTimestamp(new File(masterConfguration, relativeURL.getFile()).lastModified());
+ assertEquals(sharedConfiguration[0], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(false);
+
+ Activator.EXTENSIONS = parentFolder.toString();
+
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+ }
+
+ public void testExtensionRemoved() throws IOException {
+
+ Activator.EXTENSIONS = parentFolder.toString();
+ storeTimestamp(ext1Info.lastModified());
+ //on adding extension master must be selected in order to create new profile with extensions!
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+
+ //disable extension
+ Activator.EXTENSIONS = null;
+
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+ }
+
+ public void testExtensionModified() throws IOException {
+
+ Activator.EXTENSIONS = parentFolder.toString();
+ storeTimestamp(ext1Info.lastModified());
+ //on adding extension master must be selected in order to create new profile with extensions!
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+
+ //add new extension
+ File ext2Dir = new File(parentFolder, "ext2");
+ ext2Dir.mkdirs();
+ File file = new File(ext2Dir, "ext2.info");
+ file.createNewFile();
+ file.setLastModified(parentFolder.lastModified() + 3000);
+
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTests.java
index 454f30d8c..4eccacd1f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc. and others. All rights reserved. This
+ * Copyright (c) 2008, 2013 Red Hat, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -15,11 +15,25 @@ public class SimpleConfiguratorTests {
public static Test suite() {
TestSuite suite = new TestSuite("Tests for org.eclipse.equinox.simpleconfigurator");
+
//$JUnit-BEGIN$
+
suite.addTestSuite(SimpleConfiguratorTest.class);
+ suite.addTestSuite(SimpleConfiguratorTestExtended.class);
+ suite.addTestSuite(SimpleConfiguratorTestExtendedConfigured.class);
+
suite.addTestSuite(SimpleConfiguratorUtilsTest.class);
+ suite.addTestSuite(SimpleConfiguratorUtilsExtendedTest.class);
+ suite.addTestSuite(SimpleConfiguratorUtilsExtendedConfiguredTest.class);
+
suite.addTestSuite(BundlesTxtTest.class);
+ suite.addTestSuite(BundlesTxtTestExtended.class);
+ suite.addTestSuite(BundlesTxtTestExtendedConfigured.class);
+
suite.addTestSuite(NonExclusiveMode.class);
+ suite.addTestSuite(NonExclusiveModeExtended.class);
+ suite.addTestSuite(NonExclusiveModeExtendedConfigured.class);
+
//$JUnit-END$
return suite;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedConfiguredTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedConfiguredTest.java
new file mode 100644
index 000000000..5e9450631
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedConfiguredTest.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.util.List;
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
+import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
+
+public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfiguratorUtilsExtendedTest {
+
+ private File testData;
+ private File mainBundlesInfo;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testData = getTempFolder();
+ copy("preparing readonly data", getTestData("simpleconfigurator extensions", "testData/simpleConfiguratorExtendedTest"), testData);
+ testData = new File(testData, "extensions");
+ readonly(testData.getParentFile(), true);
+ Activator.EXTENSIONS = testData.toString();
+
+ mainBundlesInfo = getTestData("simpleconfigurator extensions - main bundles.info", "testData/simpleConfiguratorExtendedTest/main/bundles.info");
+ }
+
+ private void readonly(File f, boolean readonly) {
+ if (f.isDirectory()) {
+ for (File subfile : f.listFiles()) {
+ subfile.setWritable(!readonly);
+ readonly(subfile, readonly);
+ }
+ f.setWritable(!readonly);
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ Activator.EXTENSIONS = null;
+ readonly(testData.getParentFile(), false);
+ testData.getParentFile().delete();
+ super.tearDown();
+ }
+
+ @SuppressWarnings("deprecation")
+ public void testMultipleInfoFiles() throws MalformedURLException, IOException {
+ List<BundleInfo> readConfiguration = SimpleConfiguratorUtils.readConfiguration(mainBundlesInfo.toURL(), mainBundlesInfo.getParentFile().toURI());
+ BundleInfo a = getBundle("a", readConfiguration);
+ assertNotNull("Bundle from the main list not loaded", a);
+ assertEquals("Path not resolved properly for the main bundles.info", new File(mainBundlesInfo.getParentFile(), "plugins/a_1.0.0.jar").toURI(), getLocation(a));
+
+ BundleInfo b = getBundle("b", readConfiguration);
+ assertNotNull("Bundle from the main list not loaded", b);
+ assertEquals("Path not resolved properly for the main bundles.info", new File("/b_1.0.0.jar").toURI(), getLocation(b));
+
+ //check false positive
+ BundleInfo x = getBundle("x", readConfiguration);
+ assertNull("This bundle is not listed anywhere!", x);
+
+ BundleInfo g = getBundle("g", readConfiguration);
+ assertNotNull("Bundle from the direct extension not loaded", g);
+ assertEquals("Path not resolved properly from direct extension", new File(testData, "extension1/plugins/g_1.0.0.jar").toURI(), getLocation(g));
+
+ BundleInfo h = getBundle("h", readConfiguration);
+ assertNotNull("Bundle from the direct extension not loaded", h);
+ assertEquals("Path not resolved properly from direct extension", new File("/h_1.0.0.jar").toURI(), getLocation(h));
+
+ BundleInfo m = getBundle("m", readConfiguration);
+ assertNotNull("Bundle from the linked extension not loaded", m);
+ assertEquals("Path not resolved properly from linked extension", new File(testData.getParentFile(), "extension2/m_1.0.0.jar").toURI(), getLocation(m));
+
+ BundleInfo n = getBundle("n", readConfiguration);
+ assertNotNull("Bundle from the linked extension not loaded", n);
+ assertEquals("Path not resolved properly from linked extension", new File("/n_1.0.0.jar").toURI(), getLocation(n));
+ }
+
+ @SuppressWarnings("deprecation")
+ public void testMultipleLocations() throws MalformedURLException, IOException {
+ Activator.EXTENSIONS = testData.toString() + "," + new File(testData.getParentFile(), "extensionsForReconciler1");
+
+ List<BundleInfo> readConfiguration = SimpleConfiguratorUtils.readConfiguration(mainBundlesInfo.toURL(), mainBundlesInfo.getParentFile().toURI());
+ BundleInfo a = getBundle("a", readConfiguration);
+ assertNotNull("Bundle from the main list not loaded", a);
+ assertEquals("Path not resolved properly for the main bundles.info", new File(mainBundlesInfo.getParentFile(), "plugins/a_1.0.0.jar").toURI(), getLocation(a));
+
+ BundleInfo b = getBundle("b", readConfiguration);
+ assertNotNull("Bundle from the main list not loaded", b);
+ assertEquals("Path not resolved properly for the main bundles.info", new File("/b_1.0.0.jar").toURI(), getLocation(b));
+
+ //check false positive
+ BundleInfo x = getBundle("x", readConfiguration);
+ assertNull("This bundle is not listed anywhere!", x);
+
+ BundleInfo g = getBundle("g", readConfiguration);
+ assertNotNull("Bundle from the direct extension not loaded", g);
+ assertEquals("Path not resolved properly from direct extension", new File(testData, "extension1/plugins/g_1.0.0.jar").toURI(), getLocation(g));
+
+ BundleInfo h = getBundle("h", readConfiguration);
+ assertNotNull("Bundle from the direct extension not loaded", h);
+ assertEquals("Path not resolved properly from direct extension", new File("/h_1.0.0.jar").toURI(), getLocation(h));
+
+ BundleInfo m = getBundle("m", readConfiguration);
+ assertNotNull("Bundle from the linked extension not loaded", m);
+ assertEquals("Path not resolved properly from linked extension", new File(testData.getParentFile(), "extension2/m_1.0.0.jar").toURI(), getLocation(m));
+
+ BundleInfo n = getBundle("n", readConfiguration);
+ assertNotNull("Bundle from the linked extension not loaded", n);
+ assertEquals("Path not resolved properly from linked extension", new File("/n_1.0.0.jar").toURI(), getLocation(n));
+
+ BundleInfo aBundle = getBundle("aBundle", readConfiguration);
+ assertNotNull("Bundle from the linked extension not loaded", aBundle);
+ assertEquals("Path not resolved properly from linked extension", new File("/n_1.0.0.jar").toURI(), getLocation(n));
+ }
+
+ //on adding extension master must be selected in order to create new profile with extensions!
+ public void testSharedConfigurationMasterUnmodified() throws IOException {
+ storeTimestamp(new File(masterConfguration, relativeURL.getFile()).lastModified());
+ assertEquals(sharedConfiguration[1], configurator.chooseConfigurationURL(relativeURL, sharedConfiguration));
+ assertIsPropertySet(true);
+ }
+
+ private BundleInfo getBundle(String name, List<BundleInfo> list) {
+ for (BundleInfo info : list) {
+ if (info.getSymbolicName().equals(name)) {
+ return info;
+ }
+ }
+ return null;
+ }
+
+ private URI getLocation(BundleInfo b) {
+ if (b.getBaseLocation() != null) {
+ return b.getBaseLocation().resolve(b.getLocation());
+ }
+ return b.getLocation();
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedTest.java
new file mode 100644
index 000000000..de63cc2a9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Red Hat, Inc. - fragment support
+ *******************************************************************************/
+package org.eclipse.equinox.p2.tests.simpleconfigurator;
+
+import org.eclipse.equinox.internal.simpleconfigurator.Activator;
+
+public class SimpleConfiguratorUtilsExtendedTest extends SimpleConfiguratorTest {
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ // enable extended mode
+ Activator.EXTENDED = true;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Activator.EXTENDED = false;
+ }
+
+}
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/artifacts.xml
new file mode 100644
index 000000000..a813bf64f
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/artifacts.xml
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
+<repository name='test' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.system' value='true'/>
+ <property name='p2.timestamp' value='1228157270984'/>
+ <property name='p2.runnable' value='true'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='zzz' version='1.0.0'>
+ <properties size='2'>
+ <property name='artifact.size' value='361'/>
+ <property name='download.size' value='361'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/content.xml
new file mode 100644
index 000000000..498c0c7b7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/content.xml
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
+<repository name='metadata listener dropins' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'>
+ <properties size='2'>
+ <property name='p2.system' value='true'/>
+ <property name='p2.timestamp' value='1228157270968'/>
+ <property name='p2.runnable' value='true'/>
+ </properties>
+ <units size='1'>
+ <unit id='zzz' version='1.0.0' singleton='false'>
+ <update id='zzz' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='ZZZ Plug-in'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='zzz' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='zzz' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='zzz' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-RequiredExecutionEnvironment: J2SE-1.5&#xA;Bundle-SymbolicName: zzz&#xA;Bundle-Name: Zzz Plug-in&#xA;Manifest-Version: 1.0&#xA;Bundle-Version: 1.0.0
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_1.0.0/feature.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_1.0.0/feature.xml
new file mode 100644
index 000000000..afb647df9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_1.0.0/feature.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="myFeaturePatch"
+ label="MyFeaturePatch Feature"
+ version="1.0.0">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <requires>
+ <import feature="myFeature" version="1.0.0" patch="true"/>
+ </requires>
+
+ <plugin
+ id="mySingletonBundle"
+ download-size="0"
+ install-size="0"
+ version="1.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_2.0.0/feature.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_2.0.0/feature.xml
new file mode 100644
index 000000000..0e7227e35
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeaturePatch_2.0.0/feature.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="myFeaturePatch"
+ label="MyFeaturePatch Feature"
+ version="2.0.0">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <requires>
+ <import feature="myFeature" version="1.0.0" patch="true"/>
+ </requires>
+
+ <plugin
+ id="myBundle"
+ download-size="0"
+ install-size="0"
+ version="2.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_1.0.0/feature.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_1.0.0/feature.xml
new file mode 100644
index 000000000..e51123811
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_1.0.0/feature.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="myFeature"
+ label="MyFeature Feature"
+ version="1.0.0">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <plugin
+ id="myBundle"
+ download-size="0"
+ install-size="0"
+ version="1.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_2.0.0/feature.xml b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_2.0.0/feature.xml
new file mode 100644
index 000000000..f9b6fa0c8
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/features/myFeature_2.0.0/feature.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="myFeature"
+ label="MyFeature Feature"
+ version="2.0.0">
+
+ <description url="http://www.example.com/description">
+ [Enter Feature Description here.]
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ [Enter Copyright Description here.]
+ </copyright>
+
+ <license url="http://www.example.com/license">
+ [Enter License Description here.]
+ </license>
+
+ <plugin
+ id="myBundle"
+ download-size="0"
+ install-size="0"
+ version="2.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..33a5f5977
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: directoryBased
+Bundle-Name: directoryBased
+Bundle-Version: 1.0.0
+Bundle-ClassPath: directoryBased.jar
+
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/directoryBased.jar b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/directoryBased.jar
new file mode 100644
index 000000000..5f5e8021b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/directoryBased_1.0.0/directoryBased.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/myBundle_2.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/myBundle_2.0.0.jar
new file mode 100644
index 000000000..b7c01a542
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/myBundle_2.0.0.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_1.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_1.0.0.jar
new file mode 100644
index 000000000..a2eee0aa6
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_1.0.0.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_2.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_2.0.0.jar
new file mode 100644
index 000000000..8cd275fee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/mySingletonBundle_2.0.0.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/zzz_1.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/zzz_1.0.0.jar
new file mode 100644
index 000000000..6dbf3ef76
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/plugins/zzz_1.0.0.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.info b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.info
new file mode 100644
index 000000000..cf78b8848
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.info
@@ -0,0 +1 @@
+zzz,1.0.0,file:plugins/zzz_1.0.0.jar,4,false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.profile b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.profile
new file mode 100644
index 000000000..df4a68063
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/reconciler/extensions/ext1/simplerepo/simple.profile
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?profile version='1.0.0'?>
+<profile id='DefaultProfile' timestamp='1386012937274'>
+ <units size='1'>
+ <unit id='zzz' version='1.0.0' singleton='false'>
+ <update id='zzz' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='ZZZ Plug-in'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='zzz' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='zzz' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='zzz' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-ManifestVersion: 2&#xA;Bundle-RequiredExecutionEnvironment: J2SE-1.5&#xA;Bundle-SymbolicName: zzz&#xA;Bundle-Name: Zzz Plug-in&#xA;Manifest-Version: 1.0&#xA;Bundle-Version: 1.0.0
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</profile> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/brokenExtension/.gitignore b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/brokenExtension/.gitignore
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/brokenExtension/.gitignore
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extension2/extension2.info b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extension2/extension2.info
new file mode 100644
index 000000000..cdede9b3d
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extension2/extension2.info
@@ -0,0 +1,2 @@
+m,1.0.0,file:m_1.0.0.jar,4,false
+n,1.0.0,file:/n_1.0.0.jar,4,false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension1/extension1.info b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension1/extension1.info
new file mode 100644
index 000000000..72d88cb72
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension1/extension1.info
@@ -0,0 +1,2 @@
+g,1.0.0,file:plugins/g_1.0.0.jar,4,false
+h,1.0.0,file:/h_1.0.0.jar,4,false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension2.link b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension2.link
new file mode 100644
index 000000000..b04d6c9bf
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensions/extension2.link
@@ -0,0 +1 @@
+link=../extension2/extension2.info \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/artifacts.xml
new file mode 100644
index 000000000..0b47417d2
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/artifacts.xml
@@ -0,0 +1,24 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
+<repository name='Test Artifact Repository' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1232060468755'/>
+ <property name='p2.runnable' value='true'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='aBundle' version='1.0.0'>
+ <properties size='4'>
+ <property name='artifact.size' value='319'/>
+ <property name='download.size' value='319'/>
+ <property name='download.md5' value='1977e840df1f69b5392120a653ebbcd1'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/content.xml
new file mode 100644
index 000000000..a6241b0a7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/content.xml
@@ -0,0 +1,32 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
+<repository name='Test Metadata Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.compressed' value='false'/>
+ <property name='p2.timestamp' value='1232060468765'/>
+ </properties>
+ <units size='1'>
+ <unit id='aBundle' version='1.0.0' singleton='false'>
+ <update id='aBundle' range='[0.0.0,1.0.0)' severity='0'/>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.name' value='ABundle Plug-in'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='aBundle' version='1.0.0'/>
+ <provided namespace='osgi.bundle' name='aBundle' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='aBundle' version='1.0.0'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: aBundle&#xA;Bundle-ManifestVersion: 2&#xA;Bundle-Version: 1.0.0&#xA;Bundle-Name: ABundle Plug-in&#xA;Manifest-Version: 1.0&#xA;
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/extension3.info b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/extension3.info
new file mode 100644
index 000000000..e00e5d190
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/extension3.info
@@ -0,0 +1 @@
+aBundle,1.0.0,file:plugins/aBundle_1.0.0.jar,4,false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/plugins/aBundle_1.0.0.jar b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/plugins/aBundle_1.0.0.jar
new file mode 100644
index 000000000..6050d4ec3
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/extensionsForReconciler1/1/plugins/aBundle_1.0.0.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/main/bundles.info b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/main/bundles.info
new file mode 100644
index 000000000..728123d08
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorExtendedTest/main/bundles.info
@@ -0,0 +1,2 @@
+a,1.0.0,file:plugins/a_1.0.0.jar,4,false
+b,1.0.0,file:/b_1.0.0.jar,4,false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorTest/extension/extension.info b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorTest/extension/extension.info
new file mode 100644
index 000000000..7d9ca0f7a
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/simpleConfiguratorTest/extension/extension.info
@@ -0,0 +1 @@
+myBundle,1.0.0,file:../myBundle_1.0.0.jar,4,true \ No newline at end of file

Back to the top