Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2013-06-28 11:43:28 -0400
committerJohn Arthorne2013-06-28 11:43:28 -0400
commitd24b06045290067342e408be14f0c0629fbb1a35 (patch)
tree575ee56971645bf936726d98b0b75e8d0cd619d6 /bundles/org.eclipse.equinox.p2.tests
parent14de0249b7f2694efabfd190653eb9436fec2de6 (diff)
downloadrt.equinox.p2-d24b06045290067342e408be14f0c0629fbb1a35.tar.gz
rt.equinox.p2-d24b06045290067342e408be14f0c0629fbb1a35.tar.xz
rt.equinox.p2-d24b06045290067342e408be14f0c0629fbb1a35.zip
Fixed simple configurator test to allow running against framework in workspace
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.java10
1 files changed, 8 insertions, 2 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 736bbd671..2c1da14f2 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
@@ -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
@@ -79,6 +79,11 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
File installarea = TestActivator.context.getDataFile(getName() + "/eclipse");
File configarea = new File(installarea, "configuration");
URL osgiBundle = osgiBundleLoc.toURI().toURL();
+ //if we have framework in workspace need to add the bin directory
+ URL osgiBundleDevPath = null;
+ if (!osgiBundle.getPath().endsWith(".jar")) {
+ osgiBundleDevPath = new URL(osgiBundle, "bin/");
+ }
Map frameworkProperties = new HashMap();
// note that any properties you do not want to be inherited from the hosting Equinox will need
@@ -96,7 +101,8 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
frameworkProperties.put("org.eclipse.equinox.simpleconfigurator.configUrl", bundleInfo.toURL().toExternalForm());
frameworkProperties.put("osgi.dev", "bin/");
- equinox = new EmbeddedEquinox(frameworkProperties, new String[] {}, new URL[] {osgiBundle});
+ URL[] osgiPath = osgiBundleDevPath == null ? new URL[] {osgiBundle} : new URL[] {osgiBundle, osgiBundleDevPath};
+ equinox = new EmbeddedEquinox(frameworkProperties, new String[] {}, osgiPath);
return equinox.startFramework();
} catch (MalformedURLException e) {
return null;

Back to the top