Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: android-emulator-plugin
-
Labels:None
-
Similar Issues:
Description
It's impractical to use snapshots in your job when you're using the android-emulator plugin, as it has two modes of operating:
a) android-emulator manages and loads a snapshot,
b) android-emulator disables snapshot support.
While it would be possible for the job itself to use snapshots in a (simply by using a different snapshot name), having more than a single snapshot in a snapshot.img is currently broken (as reported in http://code.google.com/p/android/issues/detail?id=15922 - though no update so far).
This only leaves the possibility of disabling snapshots in android-emulator, but when you choose not to use snapshots it passes the -no-snapstorage, making snapshots unusable for any jobs running. Why was this design decision made - is there some gain to be had?
I've attached a simple patch that simply disables this behavior in b, until android issue 15922 is resolved.
If you have an emulator set up with a snapshots.img file, by default the emulator process will automatically attempt to load from (and save to) the "default" snapshot.
For this plugin, that behaviour is not necessarily desirable: snapshots take up a lot of disk space, hence why the plugin takes more control of how snapshots are used. If the user doesn't want to make use of them, then -no-snapstorage is passed to completely disable snapshot storage.
However, as this suggests, I hadn't considered the case that somebody would want to take full control over snapshots used by Jenkins
Normally, I would expect that emulators are created by the plugin, and nobody bothers to insert their own snapshot files.
In your case, would it be more desirable that we add a configuration option to the plugin, so you can specify the snapshot you want to use?
i.e. You can enter a custom snapshot name (if you want), which can then also do variable expansion.