Merge lp:~mvo/unity/usc-launcher-fix-982921 into lp:unity
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Didier Roche on 2012-04-26 | ||||
| Approved revision: | 2285 | ||||
| Merged at revision: | 2346 | ||||
| Proposed branch: | lp:~mvo/unity/usc-launcher-fix-982921 | ||||
| Merge into: | lp:unity | ||||
| Diff against target: |
79 lines (+37/-9) 3 files modified
manual-tests/SoftwareCenter.txt (+16/-0) plugins/unityshell/src/SoftwareCenterLauncherIcon.cpp (+20/-9) plugins/unityshell/src/SoftwareCenterLauncherIcon.h (+1/-0) |
||||
| To merge this branch: | bzr merge lp:~mvo/unity/usc-launcher-fix-982921 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Vogt | Resubmit on 2012-04-26 | ||
| Tim Penhey (community) | 2012-04-17 | Approve on 2012-04-18 | |
|
Review via email:
|
|||
Commit Message
Check for "exit_state" on the install-finished signal from aptdaemon (LP: #982921) and remove launcher icon again on failure.
Description of the Change
This branch adds a check for the "exit_state" of the install-finished signal from aptdaemon for the
software-center launcher integration and removes the launcher again if we get something other than
"exit-success". This fixes #982921.
| Didier Roche (didrocks) wrote : | # |
| Michael Vogt (mvo) wrote : | # |
Hey Didier,
I'm not familiar with untiy much, so pardon my ignorance. But I could not find a existing test for the SoftwareCenterL
I can see how to add a test.
| Didier Roche (didrocks) wrote : | # |
Hey Michael.
Rev 2183 is definitively what you want to look for.
The autopilot test (autopilot is controling the session graphically) is in test/autopilot/
Maybe Thomi who is the most familiar for autopilot can cook something really quick and easily though?
| Thomi Richards (thomir) wrote : | # |
Hi everyone,
Short answer: Testing this is tricky.
Long answer: Testing this is tricky. The software center launcher icon is tightly coupled to the apt daemon dbus protocol, which makes it hard to test from autopilot. In fact, even writing unit tests for this is tricky. What we need to do is to decouple the code that handles the launcher icon from the notion of a data source for the icon. This will allow us to create a fake data source in a unit test and feed it whatever input we like. However, looking at the code, I suspect that's not going to be the end of the issues - the SCLauncherIcon also depends on the Launcher for several things, and a couple of other classes as well. With some refactoring we can fix all this, but it's a reasonable amount of work.
If this is a really high priority I can have a look at it (dropping the tasks I'm currently on), but it's not likely to be done before tomorrow lunchtime.
What's the deadline on this?
| Didier Roche (didrocks) wrote : | # |
@Thomi: I'm happy to merge it if Michael adds a manual test to ensure that we don't loose the idea of getting it automatically tested later on.
| Michael Vogt (mvo) wrote : | # |
Thanks, I added a manual test now. Sorry about the needed refactor for a proper fix but this was just a drive-by-fix by me.
| Unity Merger (unity-merger) wrote : | # |
No commit message specified.


@Tim, @Michael: I would like to see tests on that one before approving :)