Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-04 18:05:53 +0000
committerPascal Rapicault2013-04-04 18:05:53 +0000
commitb1752f94bca09254ce97987feff474bd82006b19 (patch)
tree04a405a75deca792c35e313133fa8c4e6bdcb4c9 /bundles
parentf05563a2311ab48174bdc17054561e384a97547e (diff)
downloadrt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.tar.gz
rt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.tar.xz
rt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.zip
Bug 403722 - [shared][test] 4 shared install tests fail
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/artifacts.jarbin662 -> 662 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/content.jarbin1386 -> 1402 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201302052031.jarbin424 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201304041339.jarbin0 -> 423 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201302052031.jarbin407 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201304041339.jarbin0 -> 407 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201302052031.jarbin407 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201304041339.jarbin0 -> 407 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201302052031.jarbin19051 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201304041339.jarbin0 -> 19476 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201302052031.jarbin393 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201304041339.jarbin0 -> 394 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201302052031.jarbin393 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201304041339.jarbin0 -> 393 bytes
15 files changed, 16 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
index 92b07259d..d8ad7f105 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
@@ -389,15 +389,27 @@ public class VerifierApplication implements IApplication {
}
private IStatus hasProfileFlag() {
- if (properties.getProperty("checkProfileResetFlag") == null)
+ if (properties.getProperty("checkProfileResetFlag") == null || "false".equals(properties.getProperty("checkProfileResetFlag")))
return Status.OK_STATUS;
//Make sure that the profile is already loaded
IProfileRegistry reg = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- reg.getProfile(IProfileRegistry.SELF);
+ IProfile profile = reg.getProfile(IProfileRegistry.SELF);
+ String profileId = profile.getProfileId();
- if (Boolean.valueOf(properties.getProperty("checkProfileResetFlag")).booleanValue() == (agent.getService(IProfileRegistry.class.getName() + '_' + "NEW_SELF_TIMESTAMP") != null))
+ long history[] = reg.listProfileTimestamps(profileId);
+ long lastTimestamp = history[history.length - 1];
+ if (IProfile.STATE_SHARED_INSTALL_VALUE_NEW.equals(reg.getProfileStateProperties(profileId, lastTimestamp).get(IProfile.STATE_PROP_SHARED_INSTALL))) {
return Status.OK_STATUS;
+ }
+ if (history.length == 1) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The flag indicating that a profile has been reset is incorrectly setup");
+ }
+
+ long previousToLastTimestamp = history[history.length - 2];
+ if (IProfile.STATE_SHARED_INSTALL_VALUE_NEW.equals(reg.getProfileStateProperties(profileId, previousToLastTimestamp).get(IProfile.STATE_PROP_SHARED_INSTALL))) {
+ return Status.OK_STATUS;
+ }
+
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The flag indicating that a profile has been reset is incorrectly setup");
}
-
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/artifacts.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/artifacts.jar
index 644d1e9b8..42c3d081a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/artifacts.jar
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/artifacts.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/content.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/content.jar
index 24f403c07..b4e16e443 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/content.jar
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/content.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201302052031.jar
deleted file mode 100644
index 1b293696f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201304041339.jar
new file mode 100644
index 000000000..d0481158b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/Verifier_1.0.0.201304041339.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201302052031.jar
deleted file mode 100644
index 4bea822fe..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201304041339.jar
new file mode 100644
index 000000000..9d95765a5
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature1_1.0.0.201304041339.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201302052031.jar
deleted file mode 100644
index a927cda31..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201304041339.jar
new file mode 100644
index 000000000..4842fec47
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/features/p2TestFeature2_1.0.0.201304041339.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201302052031.jar
deleted file mode 100644
index b5054dad6..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201304041339.jar
new file mode 100644
index 000000000..9c09f0518
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/org.eclipse.equinox.p2.tests.verifier_1.0.100.201304041339.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201302052031.jar
deleted file mode 100644
index 54f26ea79..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201304041339.jar
new file mode 100644
index 000000000..ca214135c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle1_1.0.0.201304041339.jar
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201302052031.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201302052031.jar
deleted file mode 100644
index 9e7ea65de..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201302052031.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201304041339.jar b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201304041339.jar
new file mode 100644
index 000000000..18bd2483b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201304041339.jar
Binary files differ

Back to the top