summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-09 14:32:57 (EDT)
committerPascal Rapicault2013-04-09 14:32:57 (EDT)
commit6141e1a8d27f64858435f1ac151220271947c8f5 (patch)
tree6b7752e4986789ea2e543a693992ad1dd76e66a2
parent278158f00d1a73ac28e96f5cce010dfe0f6b132c (diff)
downloadrt.equinox.p2-6141e1a8d27f64858435f1ac151220271947c8f5.zip
rt.equinox.p2-6141e1a8d27f64858435f1ac151220271947c8f5.tar.gz
rt.equinox.p2-6141e1a8d27f64858435f1ac151220271947c8f5.tar.bz2
Remove sharedinstall test bundle and move existing tests in test bundle
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/META-INF/MANIFEST.MF14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/AllTests.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java)51
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java)25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.lock (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/1339695683273.profile (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/state.properties (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/userHome/.settings/org.eclipse.equinox.p2.metadata.repository.prefs (renamed from bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs)6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/synchronizeOperation/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs8
23 files changed, 47 insertions, 141 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.classpath b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.classpath
deleted file mode 100644
index 098194c..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.project b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.project
deleted file mode 100644
index bdd5cce..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tests.sharedinstall</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de36..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/META-INF/MANIFEST.MF
deleted file mode 100644
index 85484b5..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tests
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.sharedinstall
-Bundle-Version: 1.0.0.qualifier
-Fragment-Host: org.eclipse.equinox.p2.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.equinox.p2.tests;bundle-version="1.5.0",
- org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.equinox.security;bundle-version="1.1.100",
- org.junit4;bundle-version="4.8.1",
- org.eclipse.equinox.p2.metadata;bundle-version="2.1.100",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.2.100",
- org.eclipse.equinox.p2.repository;bundle-version="2.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/build.properties b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/build.properties
deleted file mode 100644
index be6734d..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- data/
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
deleted file mode 100644
index 8cb4991..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/count=1
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/enabled=true
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/nickname=The Eclipse Project Updates
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/uri=http\://download.eclipse.org/eclipse/updates/4.2
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/count=3
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/enabled=true
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/nickname=Mylyn for Eclipse Juno
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/uri=http\://download.eclipse.org/mylyn/releases/juno
-repositories/http\:__download.eclipse.org_releases_juno/count=1
-repositories/http\:__download.eclipse.org_releases_juno/enabled=true
-repositories/http\:__download.eclipse.org_releases_juno/nickname=Juno
-repositories/http\:__download.eclipse.org_releases_juno/uri=http\://download.eclipse.org/releases/juno
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock
deleted file mode 100644
index e69de29..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock
+++ /dev/null
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile
deleted file mode 100644
index 6f18bb0..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?profile version='1.0.0'?>
-<profile id='epp.package.java' timestamp='1339695683273'>
-</profile>
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties
deleted file mode 100644
index bd469b5..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties
+++ /dev/null
@@ -1 +0,0 @@
-#Thu Jun 14 13:41:23 EDT 2012
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
deleted file mode 100644
index 1831c80..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-repositories/file\:_C\:_dev_tmp/uri=file\:/C\:/dev/tmp/
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs
deleted file mode 100644
index 05c8680..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-allowNonOKPlan=prompt
-eclipse.preferences.version=1
-showLatestVersion=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile b/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile
deleted file mode 100644
index 6f18bb0..0000000
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/user/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?profile version='1.0.0'?>
-<profile id='epp.package.java' timestamp='1339695683273'>
-</profile>
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 ca2f4af..81a75e4 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
@@ -30,6 +30,8 @@ public class AllTests extends TestCase {
suite.addTestSuite(NeedsMigration.class);
suite.addTestSuite(PreviousConfigurationFinderTest.class);
suite.addTest(TestInitialRun.suite());
+ suite.addTestSuite(SharedProfilePreferencesTest.class);
+ suite.addTestSuite(SharedProfilePreferencesTestWithDataInUser.class);
return suite;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
index 2903a55..2598172 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTest.java
@@ -11,13 +11,8 @@ package org.eclipse.equinox.p2.tests.sharedinstall;
* Pascal Rapicault (Ericsson) - Initial API and implementation
*******************************************************************************/
import java.io.File;
-import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.core.runtime.preferences.IPreferencesService;
@@ -32,33 +27,24 @@ import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
- protected File getTestData(String message, String entry) {
- if (entry == null)
- fail(message + " entry is null.");
- URL base = Platform.getBundle("org.eclipse.equinox.p2.tests.sharedinstall").getEntry(entry);
- if (base == null)
- fail(message + " entry not found in bundle: " + entry);
- try {
- String osPath = new Path(FileLocator.toFileURL(base).getPath()).toOSString();
- File result = new File(osPath);
- if (!result.getCanonicalPath().equals(result.getPath()))
- fail(message + " result path: " + result.getPath() + " does not match canonical path: " + result.getCanonicalFile().getPath());
- return result;
- } catch (IOException e) {
- fail(message, e);
- }
- // avoid compile error... should never reach this code
- return null;
- }
-
protected void setUp() throws Exception {
//We don't call super.setUp() on purpose
Bundle p2Core = Platform.getBundle("org.eclipse.equinox.p2.core");
p2Core.stop();
-
- File baseInstall = getTestData("test shared install", "testData/sharedPreferences/baseInstall");
- File userHome = getTestData("test shared install", "testData/sharedPreferences/userHome");
+
+ File baseInstallToCopy = getTestData("baseInstall", "testData/sharedPrefs/baseInstall");
+ File baseInstall = getTempFolder();
+ File baseInstallToCopyTo = new File(baseInstall, "p2/org.eclipse.equinox.p2.engine/profileRegistry");
+ baseInstallToCopy.mkdirs();
+ copy("copy base install", baseInstallToCopy, baseInstallToCopyTo);
+
+ File userHomeToCopy = getTestData("useHome", "testData/sharedPrefs/userHome");
+ File userHome = getTempFolder();
+ File userHomeToCopyTo = new File(userHome, "p2/org.eclipse.equinox.p2.engine/");
+ userHomeToCopyTo.mkdirs();
+ copy("copy user home data", userHomeToCopy, userHomeToCopyTo);
+
System.setProperty("osgi.sharedConfiguration.area", new File(baseInstall, "configuration").toURI().toString());
System.setProperty("osgi.configuration.area", new File(userHome, "configuration").toURI().toString());
System.setProperty("eclipse.p2.profile", "epp.package.java");
@@ -67,12 +53,12 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
prefService.getRootNode().node("/profile/").removeNode();
p2Core.start();
}
-
- public void testCountReposInSharedInstallPreferences(){
+
+ public void testCountReposInSharedInstallPreferences() {
IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(TestActivator.getContext(), IPreferencesService.class.getName());
assertNotNull(prefService);
try {
- URI defaultLocation = URIUtil.makeAbsolute(URIUtil.fromString(TestActivator.getContext().getProperty("osgi.configuration.area") + "../p2/"), new URI("."));
+ URI defaultLocation = URIUtil.makeAbsolute(URIUtil.fromString(TestActivator.getContext().getProperty("osgi.configuration.area") + "/../p2/"), new URI("."));
String locationString = EncodingUtils.encodeSlashes(defaultLocation.toString());
Preferences node = prefService.getRootNode().node("/profile/shared/" + locationString + "/_SELF_/org.eclipse.equinox.p2.metadata.repository/repositories"); //$NON-NLS-1$
String[] children = node.childrenNames();
@@ -84,7 +70,7 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
} catch (BackingStoreException e) {
fail("Exception", e);
}
-
+
}
public void testCountRepoInSharedInstallThroughRepoManagerAPI() {
@@ -92,6 +78,5 @@ public class SharedProfilePreferencesTest extends AbstractProvisioningTest {
URI[] repos = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
assertEquals(3, repos.length);
}
-
-
+
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java
index c4590e8..431151b 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/sharedinstall/SharedProfilePreferencesTestWithDataInUser.java
@@ -1,4 +1,5 @@
package org.eclipse.equinox.p2.tests.sharedinstall;
+
/*******************************************************************************
* Copyright (c) 2012 Ericsson and others.
* All rights reserved. This program and the accompanying materials
@@ -12,14 +13,8 @@ package org.eclipse.equinox.p2.tests.sharedinstall;
import java.io.File;
import java.io.IOException;
import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
-
-import org.eclipse.core.internal.preferences.EclipsePreferences;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
import org.eclipse.equinox.internal.p2.repository.Activator;
@@ -28,10 +23,7 @@ import org.eclipse.equinox.p2.repository.IRepositoryManager;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
-import org.eclipse.equinox.security.storage.EncodingUtils;
import org.osgi.framework.Bundle;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
public class SharedProfilePreferencesTestWithDataInUser extends AbstractProvisioningTest {
protected File getTestData(String message, String entry) {
@@ -52,35 +44,34 @@ public class SharedProfilePreferencesTestWithDataInUser extends AbstractProvisio
// avoid compile error... should never reach this code
return null;
}
-
+
protected void setUp() throws Exception {
//We don't call super.setUp() on purpose
Bundle p2Core = Platform.getBundle("org.eclipse.equinox.p2.core");
p2Core.stop();
-
+
File baseInstall = getTestData("test shared install", "data/test1/base");
File userHome = getTestData("test shared install", "data/test1/user");
System.setProperty("osgi.sharedConfiguration.area", new File(baseInstall, "configuration").toURI().toString());
System.setProperty("osgi.configuration.area", new File(userHome, "configuration").toURI().toString());
System.setProperty("eclipse.p2.profile", "epp.package.java");
- System.setProperty("eclipse.p2.data.area", "@config.dir/../p2");
+ System.setProperty("eclipse.p2.data.area", "@config.dir//../p2");
IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName());
prefService.getRootNode().node("/profile/").removeNode();
p2Core.start();
-
+
//Make sure that things are properly setup
IProvisioningAgent currentAgent = getAgent();
assertEquals(currentAgent, ServiceHelper.getService(TestActivator.getContext(), IProvisioningAgent.class));
currentAgent.getService(IProvisioningAgent.SHARED_BASE_AGENT);
currentAgent.getService(IProvisioningAgent.SHARED_CURRENT_AGENT);
}
-
+
public void testCountRepoInSharedInstallThroughRepoManagerAPI() {
IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
URI[] repos = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
assertEquals(4, repos.length);
}
-
-
+
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
new file mode 100644
index 0000000..49da071
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/enabled=true
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/isSystem=false
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/name=file\:/Users/Pascal/tmp/generated - metadata
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/suffix=content.xml
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/uri=file\:/C\:/rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/testData/bug300572/repo/
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_bug300572_repo/version=1.0.0
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
index 8cb4991..8cb4991 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
index 8cb4991..8cb4991 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.lock
index e69de29..e69de29 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.lock
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/.lock
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/1339695683273.profile
index 6f18bb0..6f18bb0 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/1339695683273.profile
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/1339695683273.profile
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/state.properties
index bd469b5..bd469b5 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/sharedPreferences/baseInstall/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/state.properties
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/baseInstall/epp.package.java.profile/state.properties
diff --git a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/userHome/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
index 8cb4991..dd3534d 100644
--- a/bundles/org.eclipse.equinox.p2.tests.sharedinstall/data/test1/base/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.java.profile/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedPrefs/userHome/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
@@ -1,13 +1,13 @@
eclipse.preferences.version=1
-repositories/http\:__download.eclipse.org_eclipse_updates_4.2/count=1
repositories/http\:__download.eclipse.org_eclipse_updates_4.2/enabled=true
+repositories/http\:__download.eclipse.org_eclipse_updates_4.2/isSystem=false
repositories/http\:__download.eclipse.org_eclipse_updates_4.2/nickname=The Eclipse Project Updates
repositories/http\:__download.eclipse.org_eclipse_updates_4.2/uri=http\://download.eclipse.org/eclipse/updates/4.2
-repositories/http\:__download.eclipse.org_mylyn_releases_juno/count=3
repositories/http\:__download.eclipse.org_mylyn_releases_juno/enabled=true
+repositories/http\:__download.eclipse.org_mylyn_releases_juno/isSystem=false
repositories/http\:__download.eclipse.org_mylyn_releases_juno/nickname=Mylyn for Eclipse Juno
repositories/http\:__download.eclipse.org_mylyn_releases_juno/uri=http\://download.eclipse.org/mylyn/releases/juno
-repositories/http\:__download.eclipse.org_releases_juno/count=1
repositories/http\:__download.eclipse.org_releases_juno/enabled=true
+repositories/http\:__download.eclipse.org_releases_juno/isSystem=false
repositories/http\:__download.eclipse.org_releases_juno/nickname=Juno
repositories/http\:__download.eclipse.org_releases_juno/uri=http\://download.eclipse.org/releases/juno
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/synchronizeOperation/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs b/bundles/org.eclipse.equinox.p2.tests/testData/synchronizeOperation/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
new file mode 100644
index 0000000..0769e5b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/synchronizeOperation/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/enabled=true
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/isSystem=false
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/name=Update Site
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/suffix=content.xml
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/uri=file\:/C\:/rt.equinox.p2/bundles/org.eclipse.equinox.p2.tests/testData/synchronizeOperation/repo/
+repositories/file\:_C\:_rt.equinox.p2_bundles_org.eclipse.equinox.p2.tests_testData_synchronizeOperation_repo/version=1.0.0