Bug 430436 - Running surefire on existing app should update necessary bundles
Summary: Running surefire on existing app should update necessary bundles
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-15 01:49 EDT by Mickael Istria CLA
Modified: 2021-04-28 16:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2014-03-15 01:49:23 EDT
If you run surefire in p2installed mode multiple times (with several mvn clean verify) on same application, it will fail because it tried to install a newer version of the bundle.
The installation of units should also allow update, so the plugin could be run build and run multiple times on the same application, making it easier to develop tests.
Comment 1 Jan Sievers CLA 2014-03-17 10:46:16 EDT
I am right this only happens if you use an installation dir outside of the target/ folder?

If so, I think the proper solution is to simply use a clean slate installation in the target/ folder. This would avoid accumulating state in between test runs in the first place (and it's the default for exactly that reason).
Comment 2 Mickael Istria CLA 2014-03-17 12:25:55 EDT
(In reply to Jan Sievers from comment #1)
> I am right this only happens if you use an installation dir outside of the
> target/ folder?

Sorry, I didn't precise that. You're right, it's only when RCP app is pre-existing outside of target/ folder.

> If so, I think the proper solution is to simply use a clean slate
> installation in the target/ folder. This would avoid accumulating state in
> between test runs in the first place (and it's the default for exactly that
> reason).

You're right, it can be a valid solution, however, I would feel good to have the provisining of surefire updating the bundle instead of just installing it. It wouldn't affect anything badly IMO.
I'll try to come up with a patch later.
Comment 3 Tobias Oberlies CLA 2014-03-18 23:08:17 EDT
(In reply to comment #2)
> You're right, it can be a valid solution, however, I would feel good to have the
> provisining of surefire updating the bundle instead of just installing it. It
> wouldn't affect anything badly IMO.
> I'll try to come up with a patch later.
Do you already have an idea how to approach this? Query the installation for what is installed? Or just issue an uninstall and ignore the exit code?
Comment 4 Mickael Istria CLA 2014-03-19 12:11:26 EDT
I have the feeling introspecting the target application to decide whether to update or not would be a cleaner approach. However, it appears to be more difficult to implement. So for now, I'm ok to stick with Jan's suggestion with a "prepare-test-application" step to copy/install application in target/ folder.
Comment 5 Mickael Istria CLA 2021-04-08 18:13:37 EDT
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse/tycho/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.