Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AllTests.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/AbstractSimpleConfiguratorTest.java16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorTestExtendedConfigured.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/SimpleConfiguratorUtilsExtendedConfiguredTest.java62
6 files changed, 32 insertions, 78 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AllTests.java
index f5eb8db13..dc8d26640 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/reconciler/dropins/AllTests.java
@@ -21,9 +21,6 @@ import junit.framework.*;
* -Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/tmp/eclipse-platform-3.4-win32.zip
*/
public class AllTests extends TestCase {
-
- protected static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTest(BasicTests.suite());
@@ -31,8 +28,7 @@ public class AllTests extends TestCase {
suite.addTest(FeaturePatchTest.suite());
suite.addTest(SharedInstallTests.suite());
suite.addTest(SharedInstallTestsProfileSpoofEnabled.suite());
- if (!WINDOWS) //comment out until I will be able to debug win
- suite.addTest(SharedInstallTestsProfileSpoofEnabledConfigured.suite());
+ suite.addTest(SharedInstallTestsProfileSpoofEnabledConfigured.suite());
suite.addTest(Bug362692.suite());
return suite;
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
index 7455efc79..e0efd9a6a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AbstractSharedInstallTest.java
@@ -193,7 +193,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
realExecuteVerifier(verificationProperties, true);
}
- public static void reallyReadOnly(File folder) {
+ protected void reallyReadOnly(File folder) {
if (!Platform.getOS().equals(Platform.OS_WIN32))
return;
@@ -210,7 +210,7 @@ public abstract class AbstractSharedInstallTest extends AbstractReconcilerTest {
}
}
- public static void removeReallyReadOnly(File folder) {
+ protected void removeReallyReadOnly(File folder) {
if (!Platform.getOS().equals(Platform.OS_WIN32))
return;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java
index b95a8143a..fea2aa386 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java
@@ -20,15 +20,11 @@ import junit.framework.*;
* -Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/tmp/eclipse-platform-3.4-win32.zip
*/
public class AllTests extends TestCase {
- protected static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
public static Test suite() {
TestSuite suite = new TestSuite(AllTests.class.getName());
suite.addTest(BaseChange.suite());
- if (!WINDOWS) { //don't run on windows until I will get windows machine.
- suite.addTest(BaseChangeExtendedConfigured.suite());
- suite.addTest(BaseChangeExtendedConflicts.suite());
- }
+ suite.addTest(BaseChangeExtendedConfigured.suite());
+ suite.addTest(BaseChangeExtendedConflicts.suite());
suite.addTest(BaseChangeWithoutUserChange.suite());
suite.addTest(Cancellation.suite());
suite.addTest(DoubleBaseChange.suite());
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 063e136cb..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
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
import org.eclipse.equinox.p2.tests.embeddedequinox.EmbeddedEquinox;
-import org.eclipse.equinox.p2.tests.sharedinstall.AbstractSharedInstallTest;
import org.osgi.framework.*;
public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisioningTest {
@@ -193,19 +192,10 @@ public abstract class AbstractSimpleConfiguratorTest extends AbstractProvisionin
public void readOnly(File f, boolean readonly) {
if (f.isDirectory()) {
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- if (readonly) {
- AbstractSharedInstallTest.reallyReadOnly(f);
- } else {
- AbstractSharedInstallTest.removeReallyReadOnly(f);
- }
- return;
- }
- for (File subfile : f.listFiles()) {
- subfile.setWritable(!readonly);
- readOnly(subfile, readonly);
+ for (File f2 : f.listFiles()) {
+ readOnly(f2, readonly);
}
- f.setWritable(!readonly);
}
+ f.setWritable(!readonly);
}
}
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
index 198057e0d..5de86bea9 100644
--- 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
@@ -13,10 +13,8 @@ package org.eclipse.equinox.p2.tests.simpleconfigurator;
import java.io.*;
import java.net.URISyntaxException;
import java.util.ArrayList;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.internal.simpleconfigurator.Activator;
import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.p2.tests.sharedinstall.AbstractSharedInstallTest;
public class SimpleConfiguratorTestExtendedConfigured extends SimpleConfiguratorTestExtended {
@@ -39,22 +37,14 @@ public class SimpleConfiguratorTestExtendedConfigured extends SimpleConfigurator
ext3Info = new File(ext3Parent, "ext3.info");
ext3Info.createNewFile();
ext1Info.setLastModified(System.currentTimeMillis() + 1000);
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- AbstractSharedInstallTest.reallyReadOnly(ext1Parent);
- } else {
- ext1Parent.setWritable(false);
- }
+ ext1Parent.setWritable(false);
ext3Info.setLastModified(System.currentTimeMillis() + 1000);
}
@Override
protected void tearDown() throws Exception {
Activator.EXTENSIONS = null;
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- AbstractSharedInstallTest.removeReallyReadOnly(ext1Parent);
- } else {
- ext1Parent.setWritable(true);
- }
+ ext1Parent.setWritable(true);
super.tearDown();
}
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
index 44c8ea2df..5e9450631 100644
--- 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
@@ -16,11 +16,9 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.util.List;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.internal.simpleconfigurator.Activator;
import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.p2.tests.sharedinstall.AbstractSharedInstallTest;
public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfiguratorUtilsExtendedTest {
@@ -41,14 +39,6 @@ public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfigu
private void readonly(File f, boolean readonly) {
if (f.isDirectory()) {
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- if (readonly) {
- AbstractSharedInstallTest.reallyReadOnly(f);
- } else {
- AbstractSharedInstallTest.removeReallyReadOnly(f);
- }
- return;
- }
for (File subfile : f.listFiles()) {
subfile.setWritable(!readonly);
readonly(subfile, readonly);
@@ -72,11 +62,9 @@ public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfigu
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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) {
- 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));
- }
+ 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);
@@ -86,21 +74,17 @@ public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfigu
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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) {
- 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 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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) {
- 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 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")
@@ -112,11 +96,9 @@ public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfigu
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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) { //test use linux absolute paths
- 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));
- }
+ 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);
@@ -126,21 +108,21 @@ public class SimpleConfiguratorUtilsExtendedConfiguredTest extends SimpleConfigu
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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) { //test use linux absolute paths
- 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 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));
- if (!Platform.getOS().equals(Platform.OS_WIN32)) { //test use linux absolute paths
- 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 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!

Back to the top