Merge lp:~nick-dedekind/unity8/autopilot_test_failures into lp:unity8
- autopilot_test_failures
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Albert Astals Cid |
Approved revision: | 1710 |
Merged at revision: | 1725 |
Proposed branch: | lp:~nick-dedekind/unity8/autopilot_test_failures |
Merge into: | lp:unity8 |
Diff against target: |
101 lines (+51/-20) 2 files modified
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py (+4/-6) tests/autopilot/unity8/process_helpers.py (+47/-14) |
To merge this branch: | bzr merge lp:~nick-dedekind/unity8/autopilot_test_failures |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Albert Astals Cid (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+254118@code.launchpad.net |
Commit message
Fixed autopilot test failures related to udev input failure for power button.
Description of the change
Fixed autopilot test failures related to udev input failure for power button.
mir is not catching uinput keypresses when used immediately after being created. This causes the power button not to be triggered (or worse, only triggered once resulting in the screen turning off).
Fixed by using the greeter dbus interface rather than engaging the power switch to lock unity8.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1700
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1701
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1701
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1702
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1704
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1704
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1704
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1705
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1706
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1705
http://
Executed test runs:
None: http://
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1706
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1707
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1707
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1708
http://
Executed test runs:
None: http://
None: http://
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1708
http://
Executed test runs:
None: http://
None: http://
None: http://
None: http://
None: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1709
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1710
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1710
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
This does indeed seem to improve the general autopilot stability, there's still a few failures that need fixing, some of them are fixed by https:/
Other failures may also be related to https:/
But this defenitely seems a step forward :)
Preview Diff
1 | === modified file 'tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py' |
2 | --- tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2015-02-23 17:29:04 +0000 |
3 | +++ tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py 2015-04-02 08:16:46 +0000 |
4 | @@ -91,10 +91,9 @@ |
5 | def test_greeter_hides_on_app_open(self): |
6 | """Greeter should hide when an app is opened""" |
7 | process_helpers.lock_unity() |
8 | + |
9 | + application_name = self.launch_fake_app() |
10 | greeter = self.main_window.get_greeter() |
11 | - self.assertThat(greeter.created, Eventually(Equals(True))) |
12 | - |
13 | - application_name = self.launch_fake_app() |
14 | greeter.wait_swiped_away() |
15 | process_helpers.unlock_unity() |
16 | self.assert_current_focused_application(application_name) |
17 | @@ -108,10 +107,9 @@ |
18 | self.assert_current_focused_application('unity8-dash') |
19 | |
20 | process_helpers.lock_unity() |
21 | + |
22 | + self.launch_upstart_application(application_name) |
23 | greeter = self.main_window.get_greeter() |
24 | - self.assertThat(greeter.created, Eventually(Equals(True))) |
25 | - |
26 | - self.launch_upstart_application(application_name) |
27 | greeter.wait_swiped_away() |
28 | process_helpers.unlock_unity() |
29 | self.assert_current_focused_application(application_name) |
30 | |
31 | === modified file 'tests/autopilot/unity8/process_helpers.py' |
32 | --- tests/autopilot/unity8/process_helpers.py 2015-02-23 17:29:04 +0000 |
33 | +++ tests/autopilot/unity8/process_helpers.py 2015-04-02 08:16:46 +0000 |
34 | @@ -89,20 +89,53 @@ |
35 | |
36 | |
37 | def lock_unity(unity_proxy_obj=None): |
38 | - """Helper function that attempts to lock the unity greeter.""" |
39 | - import evdev |
40 | - import time |
41 | - uinput = evdev.UInput(name='unity8-autopilot-power-button', |
42 | - devnode='/dev/autopilot-uinput') |
43 | - # One press and release to turn screen off (locking unity) |
44 | - uinput.write(evdev.ecodes.EV_KEY, evdev.ecodes.KEY_POWER, 1) |
45 | - uinput.write(evdev.ecodes.EV_KEY, evdev.ecodes.KEY_POWER, 0) |
46 | - uinput.syn() |
47 | - time.sleep(1) |
48 | - # And another press and release to turn screen back on |
49 | - uinput.write(evdev.ecodes.EV_KEY, evdev.ecodes.KEY_POWER, 1) |
50 | - uinput.write(evdev.ecodes.EV_KEY, evdev.ecodes.KEY_POWER, 0) |
51 | - uinput.syn() |
52 | + """Helper function that attempts to lock unity greeter. |
53 | + |
54 | + If unity_proxy_object is None create a proxy object by querying for the |
55 | + running unity process. |
56 | + Otherwise re-use the passed proxy object. |
57 | + |
58 | + :raises RuntimeError: if the greeter attempts and fails to be locked. |
59 | + |
60 | + :raises RuntimeWarning: when the greeter is found because it is |
61 | + already locked. |
62 | + :raises CannotAccessUnity: if unity is not introspectable or cannot be |
63 | + found on dbus. |
64 | + :raises CannotAccessUnity: if unity's upstart status is not "start" or the |
65 | + upstart job cannot be found at all. |
66 | + |
67 | + """ |
68 | + if unity_proxy_obj is None: |
69 | + try: |
70 | + pid = _get_unity_pid() |
71 | + unity = _get_unity_proxy_object(pid) |
72 | + main_window = unity.select_single(main_window_emulator.QQuickView) |
73 | + except ProcessSearchError as e: |
74 | + raise CannotAccessUnity( |
75 | + "Cannot introspect unity, make sure that it has been started " |
76 | + "with testability. Perhaps use the function " |
77 | + "'restart_unity_with_testability' this module provides." |
78 | + "(%s)" |
79 | + % str(e) |
80 | + ) |
81 | + else: |
82 | + main_window = unity_proxy_obj.select_single( |
83 | + main_window_emulator.QQuickView) |
84 | + |
85 | + greeter = main_window.get_greeter() |
86 | + if greeter.created is True: |
87 | + raise RuntimeWarning("Greeter appears to be already locked.") |
88 | + |
89 | + bus = dbus.SessionBus() |
90 | + dbus_proxy = bus.get_object("com.canonical.UnityGreeter", "/") |
91 | + try: |
92 | + dbus_proxy.ShowGreeter() |
93 | + except dbus.DBusException: |
94 | + logger.info("Failed to lock greeter") |
95 | + raise |
96 | + else: |
97 | + greeter.created.wait_for(True) |
98 | + logger.info("Greeter locked, continuing.") |
99 | |
100 | |
101 | def restart_unity_with_testability(*args): |
FAILED: Continuous integration, rev:1699 jenkins. qa.ubuntu. com/job/ unity8- ci/5485/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 1970 jenkins. qa.ubuntu. com/job/ unity-phablet- qmluitests- vivid/649 jenkins. qa.ubuntu. com/job/ unity8- vivid-amd64- ci/650 jenkins. qa.ubuntu. com/job/ unity8- vivid-i386- ci/650 jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- runner- vivid-mako/ 1736 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 1968 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 1968/artifact/ work/output/ *zip*/output. zip s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 19153
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity8- ci/5485/ rebuild
http://