Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Equinox p2 tests

Setup

  • To run through all these tests you will need test repositories. It is good to have both a remote repository and a local one (because some tests involve hacking the metadata).
    • Use the repository available at http://update.eclipse.org/testUpdates/.
    • Generate repos for two versions of the eclipse SDK. At generation time make sure to use different root versions for the generated SDK's (Use the -rootVersion argument in the launch config to control this). Some of the tests require an SDK later than what you've already provisioned. If you don't have one available, you can hack the version number of the SDK root IU to make it look later.

Throughout the scenarios, SDK-v1 will refer to the oldest version of the two SDKs and SDK-v2 to the newest one.

To test the end user UI, you must first install an SDK and end user UI from the admin UI, then launch the provisioned SDK.

Core Tests (using Admin UI)

Basic install, run and update from Admin UI

  • Using the Admin UI:
    • create a new profile
    • install the SDK-v1
  • Run the provisioned install
  • Using the Admin UI:
    • look for updates, install eclipse SDK-v2
  • Run the provisioned install and verify that the SDK-v2 plugins are here
  • Also check that the profile is properly updated in the Admin UI

Variation, try with/without exiting the Admin UI.

Basic install, run and update using remote repository

  • Using the Admin UI:
    • create a new profile
    • connect to the test repository
    • install the SDK-v1
  • Run the provisioned install
  • Using the Admin UI:
    • look for updates, install eclipse SDK-v2
  • Run the provisioned install and verify that the SDK-v2 plugins are here
  • Also check that the profile is properly updated in the Admin UI

Basic install/update from Admin UI

  • Using the Admin UI:
    • Create a new profile
    • Install the SDK-v1
  • Do *not* start the provisioned install
  • Using the Admin UI:
    • look for updates, install eclipse SDK-v2
  • Run and verify that the plugins have been changed
  • Also check that the profile is properly updated in the Admin UI

Variation, try with/without exiting the Admin UI.

Bundle pool

  • Using the Admin UI:
    • Create a new profile
    • Install the SDK. During the installation notice the dialog saying that around 150M (the size of the SDK) should be "installed" (caveat, this may already be giving you the same result than in the second step if you are installing an already installed SDK.)
  • Create a second profile
  • Install the SDK in it
    • During the installation notice the dialog saying that only around 50K should be "installed".
    • Notice that the download phase goes much faster.
  • Uninstall the two SDK previously installed
  • Navigate to the folder of the bundle pool and notice that all the jars and folders are now gone. the GC has run.

Bundle pool in the eclipse install

  • Using the Admin UI:
    • Create a new profile: in the dialog set the install folder and the bundle pool to the same location. It will be the root of your eclipse install.
  • Install the SDK
  • Verify that the plugins folder is located at a subfolder of the install location
  • Verify that the path in the bundles.txt are relative.
  • Verify that the path in the osgi.bundles property of the config.ini are relative


Download Resilience

  • From the Admin UI
    • Create a profile
    • Install an SDK and while the download proceeds find an inventive way (a.k.a not using cancel) to abort the download (e.g. unplug the network cable, kill the process, etc.).
    • Restart the installation and see if it completes normally

Dropins Reconciler

  • From the Admin UI
    • Create a profile and install the SDK and User UI
  • For M4 the following manual steps are required.
    • Go to your install folder and edit your eclipse.ini
      • add "-console" at the top.
      • add "-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:\ontheside\dropins" to the VM arguments at the bottom
      • Note: The dropin folder must not be inside the profile because of how frameworkadmin adjusts paths to make them relative and a bug with install dir.
      • If you want to collocate your dropins folder you will have to set "-Dosgi.install.area=file:/c:/yourprofile"
    • save and start eclipse
    • at the console "start" the org.eclipse.equiniox.p2.reconciler.dropins bundle
    • exit eclipse
  • Testing
    • put a bundle in your dropins folder
    • start eclipse and verify that the bundle was installed
    • exit eclipse
    • remove the bundle from your dropins folder
    • start eclipse and verify that the bundle was uninstalled

Update Manager compatibility

  • Run the Agent
  • Create a new profile
  • Add metadata and artifact repositories
  • Install an SDK into the profile.
    • Set the bundle pool location to be the same as the install directory to get the same setup as the current Eclipse SDK
  • In a p2 workspace, export the following bundles. (set the qualifier to be 0 in the export options)
    • org.eclipse.ecf.provider.filetransfer
    • org.eclipse.equinox.frameworkadmin.equinox
    • org.eclipse.equinox.p2.director
    • org.eclipse.equinox.p2.directorywatcher
    • org.eclipse.equinox.p2.download
    • org.eclipse.equinox.p2.engine
    • org.eclipse.equinox.p2.exemplarysetup
    • org.eclipse.equinox.p2.garbagecollector
    • org.eclipse.equinox.p2.reconciler.dropins
    • org.eclipse.equinox.p2.touchpoint.eclipse
    • org.eclipse.equinox.simpleconfigurator.manipulator
  • Put the exported bundles in the plug-ins directory of the installed SDK
  • Add the new bundles to the bundles.txt file in the config/org.eclipse.equinox.simpleconfigurator directory
org.eclipse.ecf.provider.filetransfer,1.4.0.0,file:plugins/org.eclipse.ecf.provider.filetransfer_1.4.0.0.jar,4,false
org.eclipse.equinox.frameworkadmin.equinox,0.1.0.0,file:plugins/org.eclipse.equinox.frameworkadmin.equinox_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.touchpoint.eclipse,0.1.0.0,file:plugins/org.eclipse.equinox.p2.touchpoint.eclipse_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.director,0.1.0.0,file:plugins/org.eclipse.equinox.p2.director_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.directorywatcher,0.1.0.0,file:plugins/org.eclipse.equinox.p2.directorywatcher_0.1.0.0.jar,4,true
org.eclipse.equinox.p2.download,0.1.0.0,file:plugins/org.eclipse.equinox.p2.download_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.engine,0.1.0.0,file:plugins/org.eclipse.equinox.p2.engine_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.exemplarysetup,0.1.0.0,file:plugins/org.eclipse.equinox.p2.exemplarysetup_0.1.0.0.jar,4,true
org.eclipse.equinox.p2.garbagecollector,0.1.0.0,file:plugins/org.eclipse.equinox.p2.garbagecollector_0.1.0.0.jar,4,false
org.eclipse.equinox.p2.reconciler.dropins,0.1.0.0,file:plugins/org.eclipse.equinox.p2.reconciler.dropins_0.1.0.0.jar,4,true
org.eclipse.equinox.simpleconfigurator.manipulator,0.1.0.0,file:plugins/org.eclipse.equinox.simpleconfigurator.manipulator_0.1.0.0.jar,1,true
  • Modify the eclipse.ini file to turn on reconciliation
-Dorg.eclipse.p2.update.compatibility=true
  • You can now add extension locations via the Update Manager "Manage Configurations" dialog
  • Also links/ folders should be discovered on startup

End User UI Tests

These tests should be run inside a provisioned SDK with the end user UI. You should already have one if you did the above tests, but if not, here's how:

The admin UI can be used to verify the tests by looking at the contents of the profile of the provisioned SDK. If at any time you don't see the installed features you expect in the Installed Features list of the end user UI, start up the admin UI and verify there. Also note there are admin UI preferences (on the Provisioning page) that control which IU's are shown when browsing profiles).

Install from End User UI

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
    • Find the releng tools in the available features page
    • Install the releng tools
  • Accept to restart.
  • Notice the presence of the releng tools (should be listed in the installed features page)

Verification with admin UI - the provisioned SDK profile should show the installed feature

Uninstall the releng tools from End User UI

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
    • Go to Installed features page
    • Select the releng tools
    • Uninstall
  • Accept the restart
  • Come back up and notice the absence of the releng tools (no longer listed in installed features page)

Verification with admin UI - releng tools are absent

Update the SDK from End User UI

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • First verify that the Available Features page has an updated SDK
    • You must be connected to a repo with an updated SDK
    • Choose "Manage sites" and add the test site if you need to
  • Now go to Installed features page
    • Click "Check for Updates"
    • You should see the new SDK offered as an update.
    • Finish the wizard, accept the restart when done
    • Verify that the end user UI now shows the new version in the installed features list

Reverting from the End User UI

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
    • Go to available features page and find the releng tools
    • Select and install the releng tools
    • Verify that the "Installed Features" list shows the releng tools
    • Choose "Revert Configuration..." and select a timestamped configuration that does not have the releng tools, Finish
    • Verify that the "Installed Features" list no longer shows the releng tools, but still shows the SDK and end user UI

Automatic updates

  • Start the provisioned SDK
  • Go to the Automatic Update preferences and enable auto update on startup
    • Make sure you are on the end user UI pref page, not the old update pref page. They are similar. The correct pref page has a "When updates are found" group at the bottom.
  • Ensure you are connected to a repo that has a newer version of the SDK, userUI, or releng tools
  • Exit the provisioned SDK and restart
  • Look for popup notifying you of updates
  • Click on popup to launch the update wizard
  • Update and verify as usual

Automatic update with remind option

  • Start the provisioned SDK
  • Go to the Automatic Update preferences and enable auto update on startup
    • Make sure you are on the end user UI pref page, not the old update pref page. They are similar. The correct pref page has a "When updates are found" group at the bottom.
    • Enable the "When updates are found" pref to remind you every 5 minutes
  • Ensure you are connected to a repo that has a newer version of the SDK, userUI, or releng tools
  • Exit the provisioned SDK and restart
  • Look for popup notifying you of updates
    • Popup should say it will remind you in 5 minutes
    • Close popup (choose X in upper right corner)
    • Find some other work to do
    • Popup should reappear in 5 minutes
    • Click on popup and you'll see the update wizard

Automatic update via status bar

  • Start the provisioned SDK
  • Go to the Automatic Update preferences and enable auto update on startup
    • Make sure you are on the end user UI pref page, not the old update pref page. They are similar. The correct pref page has a "When updates are found" group at the bottom.
    • Enable the "When updates are found" pref to remind you every 5 minutes
  • Ensure you are connected to a repo that has a newer version of the SDK, userUI, or releng tools
  • Exit the provisioned SDK and restart
  • Look for popup notifying you of updates
    • Popup should say it will remind you in 5 minutes
    • Close popup (choose X in upper right corner)
    • Now click on update icon in status bar, you'll see the update wizard
    • Finish the update
    • The popup shouldn't come back and remind you since you did the update.

Automatic update on daily schedule with automatic download (try this just before lunch)

  • Start the provisioned SDK
  • Go to the Automatic Update preferences and enable auto update on startup
    • Make sure you are on the end user UI pref page, not the old update pref page. They are similar. The correct pref page has a "When updates are found" group at the bottom.
    • Choose every day and a time which is the next hour (while you're eating)
    • Enable the "Download new updates automatically option"
  • Ensure you are connected to a repo that has a newer version of the SDK, userUI, or releng tools
  • Exit the provisioned SDK and restart
  • Go to lunch
  • Popup should appear notifying you of updates on the hour you specified
    • The popup should explain that the updates have already been downloaded
    • You should notice that the update is faster since the updates were downloaded already

Update description in update wizard

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • You must be connected to a repo with an updated SDK, end user UI
  • Go to Installed features page
    • Click "Check for Updates"
    • You should see the new SDK and end user UI offered as an update.
    • Select each one and you should see the update description in the details area of the wizard
    • If you uncheck either one, you should see a progress bar while the validity is computed

License page behavior when no licenses defined

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • You must be connected to a repo with an updated SDK, end user UI
  • Go to Installed features page
    • Click "Check for Updates"
    • You should see the new SDK and end user UI offered as an update.
    • You should not see a license page in the wizard since the metadata has no license

IU properties in property pages and install wizard

You will need to hack some metadata into your local repo. Choose a group feature IU (such as RCP feature) and add some properties to the content.xml.

      <property name='equinox.p2.name' value='Eclipse RCP'/>
       <property name='equinox.p2.license' value='This is the coolest license ever.'/>
       <property name='equinox.p2.license.id' value='Cool'/>
       <property name='equinox.p2.contact' value='hacker@eclipse.org'/>
       <property name='equinox.p2.provider' value='Eclipse.org'/>
       <property name='equinox.p2.doc.url' value='http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_4.html'/>
       <property name='equinox.p2.description' value='This software rocks my world.'/>
       <property name='equinox.p2.copyright' value='Copyright 2008. All rights reserved.'/>
  • Start the provisioned SDK
  • Go to Available features page
  • Click on the RCP feature IU
    • Press properties and you should see property pages with your information
    • The doc link should open a browser to the doc URL
    • Close the property page
  • Now click "Install"
    • Selecting the IU in the wizard should show the description at the bottom
    • There should be a license page that you have to visit before installing

Remembering accepted licenses

You will need to hack some metadata. Generate metadata for an SDK, giving it a root IU version that is later than what you have provisioned (so that there will be an update for it).

Then hack in a license id and license text for the this IU.

       <property name='equinox.p2.license.id' value='Cool'/>
       <property name='equinox.p2.license' value='This is the coolest license ever.'/>
  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • Go to Installed features page
    • Click "Check for Updates"
    • You should see the new SDK offered as an update.
    • You should not see a license page in the wizard since the license id was remembered from before.

Encountering new licenses

Go back to your metadata and change the license id for the SDK root IU.

       <property name='equinox.p2.license.id' value='Cooler'/>
       <property name='equinox.p2.license' value='This is the coolest license ever.'/>
  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • Go to Installed features page
    • Click "Check for Updates"
    • You should see the new SDK offered as an update.
    • There should be a license page that you have to visit before installing since the license id changed


General preferences

  • Start the provisioned SDK
  • Help>Software Updates (Incubation)...
  • Go to the Install/Update preferences
    • Make sure you are on the end user UI pref page. It should have one group that says "Browsing for updates".
    • Click the "Show all versions of available software" button and close the prefs
  • Help>Software Updates (Incubation)...
    • Go to the installed features page and check for updates
    • You should see every version of the SDK that is newer than what you installed, not just the latest
    • The latest one should be checked in the wizard
    • Try checking other ones or combinations and see what the resolver does

Who, what platform

  • Pascal, MacOs, XP
  • Andrew, Linux (gtk 2.12.1)
  • DJ, Linux
  • John, Vista, Windows XP
  • Simon, Windows XP
  • Allan, XP
  • Susan, Windows XP

Back to the top