Merge lp:~dobey/pay-ui/mir-app-test into lp:pay-ui

Proposed by dobey on 2015-02-26
Status: Merged
Approved by: dobey on 2015-03-16
Approved revision: 105
Merged at revision: 116
Proposed branch: lp:~dobey/pay-ui/mir-app-test
Merge into: lp:pay-ui
Diff against target: 74 lines (+26/-9)
3 files modified
HACKING (+1/-1)
manifest.json.in (+1/-0)
tests/autopilot/pay_ui/tests/__init__.py (+24/-8)
To merge this branch: bzr merge lp:~dobey/pay-ui/mir-app-test
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) 2015-02-26 Approve on 2015-03-16
PS Jenkins bot continuous-integration Approve on 2015-03-13
Review via email: mp+251163@code.launchpad.net

Commit Message

Run using ubuntu-app-test when the display manager is Mir.
Fix a missing \ in HACKING file for adt-run command.

Description of the Change

This changes the autopilot tests to run the app using ubuntu-app-test when Mir is the display manager being used. This depends on https://code.launchpad.net/~ted/ubuntu-app-launch/app-test/+merge/250661 to be able to run.

To post a comment you must log in.
Alejandro J. Cura (alecu) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING'
2--- HACKING 2015-02-13 14:04:36 +0000
3+++ HACKING 2015-03-06 19:25:36 +0000
4@@ -81,7 +81,7 @@
5 $ adt-run --click-source . \
6 --click ./com.canonical.payui_15.01.*_amd64.click \
7 -o /tmp/adt-payui-test -U --apt-pocket proposed \
8- --setup-commands ubuntu-touch-session
9+ --setup-commands ubuntu-touch-session \
10 --- qemu ~/adt-vivid-amd64-cloud.img
11
12 To examine the test results, which are in subunit format, additional tools are
13
14=== modified file 'manifest.json.in'
15--- manifest.json.in 2015-02-10 15:58:29 +0000
16+++ manifest.json.in 2015-03-06 19:25:36 +0000
17@@ -26,6 +26,7 @@
18 "python3-fixtures",
19 "python3-testtools",
20 "qtdeclarative5-ubuntu-ui-toolkit-plugin",
21+ "ubuntu-app-test",
22 "ubuntu-sdk-libs"
23 ]
24 }
25
26=== modified file 'tests/autopilot/pay_ui/tests/__init__.py'
27--- tests/autopilot/pay_ui/tests/__init__.py 2015-02-12 18:21:36 +0000
28+++ tests/autopilot/pay_ui/tests/__init__.py 2015-03-06 19:25:36 +0000
29@@ -14,6 +14,7 @@
30 # You should have received a copy of the GNU General Public License
31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
32
33+import autopilot
34 import fixtures
35 import json
36 import os
37@@ -86,14 +87,29 @@
38 installed_directory, 'qml', 'payui.qml')
39 desktop_file_path = os.path.join(
40 installed_directory, 'payui_payui.desktop')
41- return self.launch_test_application(
42- uutk.base.get_qmlscene_launch_command(),
43- qml_file_path,
44- '--desktop_file_hint=%s' % desktop_file_path,
45- '--transparent',
46- 'purchase://com.example.testapp',
47- app_type='qt',
48- emulator_base=uutk.UbuntuUIToolkitCustomProxyObjectBase)
49+ # Check if we are using Mir or not.
50+ if autopilot.platform.get_display_server() == "MIR":
51+ return self.launch_test_application(
52+ 'ubuntu-app-test',
53+ uutk.base.get_qmlscene_launch_command(),
54+ '-testability',
55+ qml_file_path,
56+ '--desktop_file_hint=%s' % desktop_file_path,
57+ '--transparent',
58+ 'purchase://com.example.testapp',
59+ app_type='qt',
60+ emulator_base=uutk.UbuntuUIToolkitCustomProxyObjectBase)
61+ else:
62+ return self.launch_test_application(
63+ uutk.base.get_qmlscene_launch_command(),
64+ '-testability',
65+ qml_file_path,
66+ '--desktop_file_hint=%s' % desktop_file_path,
67+ '--transparent',
68+ 'purchase://com.example.testapp',
69+ app_type='qt',
70+ emulator_base=uutk.UbuntuUIToolkitCustomProxyObjectBase)
71+
72
73 def get_arch_triplet(self):
74 """Return the dpkg-architecture triplet for shared objects."""

Subscribers

People subscribed via source and target branches

to all changes: