summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-04-04 14:05:53 (EDT)
committerPascal Rapicault2013-04-04 14:05:53 (EDT)
commitb1752f94bca09254ce97987feff474bd82006b19 (patch)
tree04a405a75deca792c35e313133fa8c4e6bdcb4c9
parentf05563a2311ab48174bdc17054561e384a97547e (diff)
downloadrt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.zip
rt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.tar.gz
rt.equinox.p2-b1752f94bca09254ce97987feff474bd82006b19.tar.bz2
Bug 403722 - [shared][test] 4 shared install tests fail
-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 92b0725..d8ad7f1 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 644d1e9..42c3d08 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 24f403c..b4e16e4 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 1b29369..0000000
--- 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 0000000..d048115
--- /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 4bea822..0000000
--- 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 0000000..9d95765
--- /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 a927cda..0000000
--- 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 0000000..4842fec
--- /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 b5054da..0000000
--- 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 0000000..9c09f05
--- /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 54f26ea..0000000
--- 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 0000000..ca21413
--- /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 9e7ea65..0000000
--- 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 0000000..18bd248
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/sharedInstall/repo/plugins/p2TestBundle2_1.0.0.201304041339.jar
Binary files differ