diff options
author | Pascal Rapicault (Ericsson) | 2013-04-04 18:05:53 +0000 |
---|---|---|
committer | Pascal Rapicault | 2013-04-04 18:05:53 +0000 |
commit | b1752f94bca09254ce97987feff474bd82006b19 (patch) | |
tree | 04a405a75deca792c35e313133fa8c4e6bdcb4c9 /bundles | |
parent | f05563a2311ab48174bdc17054561e384a97547e (diff) | |
download | rt.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')
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 Binary files differindex 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 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 Binary files differindex 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 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 Binary files differdeleted 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 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 Binary files differnew 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 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 Binary files differdeleted 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 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 Binary files differnew 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 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 Binary files differdeleted 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 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 Binary files differnew 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 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 Binary files differdeleted 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 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 Binary files differnew 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 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 Binary files differdeleted 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 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 Binary files differnew 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 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 Binary files differdeleted 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 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 Binary files differnew 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 |