Merge lp:~barry/mediaplayer-app/py3autopilot into lp:mediaplayer-app

Proposed by Barry Warsaw
Status: Merged
Approved by: Jim Hodapp
Approved revision: 237
Merged at revision: 246
Proposed branch: lp:~barry/mediaplayer-app/py3autopilot
Merge into: lp:mediaplayer-app
Prerequisite: lp:~canonical-platform-qa/mediaplayer-app/fix1341956-test_no_video
Diff against target: 253 lines (+41/-39)
7 files modified
debian/changelog (+7/-0)
debian/control (+3/-3)
tests/autopilot/CMakeLists.txt (+1/-1)
tests/autopilot/mediaplayer_app/emulators/main_window.py (+3/-3)
tests/autopilot/mediaplayer_app/tests/__init__.py (+0/-1)
tests/autopilot/mediaplayer_app/tests/test_player.py (+0/-2)
tests/autopilot/mediaplayer_app/tests/test_player_with_video.py (+27/-29)
To merge this branch: bzr merge lp:~barry/mediaplayer-app/py3autopilot
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Jim Hodapp (community) code Approve
Review via email: mp+226857@code.launchpad.net

This proposal supersedes a proposal from 2014-06-09.

Commit message

* Port autopilot tests to Python 3.
* Bump Standards-Version to 3.9.5.

Description of the change

Related MPs: https://code.launchpad.net/~canonical-platform-qa/mediaplayer-app/fix1341956-test_no_video

Branch is in sync w/latest trunk (as of 15-Jul-2014)

No manual testing done, since this is strictly a port to Python 3 for the autopilot test suite.

Automated tests have been run.

No UI changes involved.

No packaging changes involved.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

I've kicked a new jenkins run to see what's the status of this branch.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:236
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~barry/mediaplayer-app/py3autopilot/+merge/226857/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/mediaplayer-app-ci/203/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2034
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/1705
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-utopic-amd64-ci/11
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-utopic-armhf-ci/11
        deb: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-utopic-armhf-ci/11/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-utopic-i386-ci/11
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2269
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3161
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3161/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/9889
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1429
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1914
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1914/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mediaplayer-app-ci/203/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

The only failure is on the test that's skiped on desktop on the prerequisite. This is good to go.

237. By Barry Warsaw

Pre-requisite branch merge.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

There was a crash on the latest run. Kicking Jenkins one more time.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good, thanks.

review: Approve (code)
238. By Barry Warsaw

merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-07-16 14:47:25 +0000
3+++ debian/changelog 2014-07-16 17:12:03 +0000
4@@ -1,3 +1,10 @@
5+mediaplayer-app (0.20.5+14.10.20140716-0ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Port autopilot tests to Python 3.
8+ * Bump Standards-Version to 3.9.5.
9+
10+ -- Barry Warsaw <barry@ubuntu.com> Wed, 16 Jul 2014 13:11:12 -0400
11+
12 mediaplayer-app (0.20.5+14.10.20140716-0ubuntu1) utopic; urgency=low
13
14 [ Alan Pope ]
15
16=== modified file 'debian/control'
17--- debian/control 2014-05-09 16:11:44 +0000
18+++ debian/control 2014-07-16 17:12:03 +0000
19@@ -8,11 +8,11 @@
20 libgl1-mesa-dev | libgl-dev,
21 libgles2-mesa-dev,
22 pkg-config,
23- python,
24+ python3,
25 qtbase5-dev,
26 qtdeclarative5-dev,
27 qtmultimedia5-dev,
28-Standards-Version: 3.9.4
29+Standards-Version: 3.9.5
30 # If you don't have commit rights to lp:mediaplayer-app but need to upload
31 # packaging changes, just go ahead. The developers will notice and sync
32 # up the code again.
33@@ -43,7 +43,7 @@
34 libqt5test5,
35 libqt5widgets5,
36 mediaplayer-app (>= ${source:Version}),
37- python-autopilot,
38+ python3-autopilot,
39 Conflicts: media-player-autopilot
40 Replaces: media-player-autopilot
41 Provides: media-player-autopilot
42
43=== modified file 'tests/autopilot/CMakeLists.txt'
44--- tests/autopilot/CMakeLists.txt 2013-05-23 20:00:37 +0000
45+++ tests/autopilot/CMakeLists.txt 2014-07-16 17:12:03 +0000
46@@ -1,6 +1,6 @@
47 set(AUTOPILOT_DIR mediaplayer_app)
48
49-execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
50+execute_process(COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
51 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
52
53 install(DIRECTORY ${AUTOPILOT_DIR}
54
55=== modified file 'tests/autopilot/mediaplayer_app/emulators/main_window.py'
56--- tests/autopilot/mediaplayer_app/emulators/main_window.py 2013-10-21 11:47:18 +0000
57+++ tests/autopilot/mediaplayer_app/emulators/main_window.py 2014-07-16 17:12:03 +0000
58@@ -6,7 +6,7 @@
59 # by the Free Software Foundation.
60
61
62-class MainWindow(object):
63+class MainWindow:
64 """An emulator class that makes it easy to interact with the camera-app."""
65
66 def __init__(self, app):
67@@ -17,10 +17,10 @@
68 return self.app.select_single("QQuickView")
69
70 def get_controls(self):
71- return self.app.select_single("Controls", objectName="controls")
72+ return self.app.select_single("Controls", objectName="controls")
73
74 def get_video_area(self):
75- return self.app.select_single("VideoPlayer", objectName="player")
76+ return self.app.select_single("VideoPlayer", objectName="player")
77
78 def get_toolbar(self):
79 return self.app.select_single("GenericToolbar", objectName="toolbar")
80
81=== modified file 'tests/autopilot/mediaplayer_app/tests/__init__.py'
82--- tests/autopilot/mediaplayer_app/tests/__init__.py 2013-09-04 16:25:10 +0000
83+++ tests/autopilot/mediaplayer_app/tests/__init__.py 2014-07-16 17:12:03 +0000
84@@ -7,7 +7,6 @@
85
86 """mediaplayer-app autopilot tests."""
87
88-import os.path
89 import os
90
91 from autopilot.input import Mouse, Touch, Pointer
92
93=== modified file 'tests/autopilot/mediaplayer_app/tests/test_player.py'
94--- tests/autopilot/mediaplayer_app/tests/test_player.py 2014-07-16 17:12:03 +0000
95+++ tests/autopilot/mediaplayer_app/tests/test_player.py 2014-07-16 17:12:03 +0000
96@@ -7,8 +7,6 @@
97
98 """Tests for the Mediaplayer App"""
99
100-from __future__ import absolute_import
101-
102 from autopilot import platform
103 from autopilot.matchers import Eventually
104 from testtools.matchers import Equals
105
106=== modified file 'tests/autopilot/mediaplayer_app/tests/test_player_with_video.py'
107--- tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2014-04-17 21:30:48 +0000
108+++ tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2014-07-16 17:12:03 +0000
109@@ -7,8 +7,6 @@
110
111 """Tests for the Mediaplayer App"""
112
113-from __future__ import absolute_import
114-
115 from autopilot.matchers import Eventually
116 from autopilot.platform import model
117 from testtools import skipIf
118@@ -26,8 +24,9 @@
119 In the testfarm, the application may take some time to show up."""
120 def setUp(self):
121 super(TestPlayerWithVideo, self).setUp()
122- print model()
123- if model() == 'Nexus 4' or model() == 'Galaxy Nexus' or model() == "Nexus 7 (2013) Wi-Fi" or model() == "Nexus 10":
124+ print(model())
125+ if model() in (
126+ 'Nexus 4', 'Galaxy Nexus', "Nexus 7 (2013) Wi-Fi", "Nexus 10"):
127 self.launch_app("h264.avi")
128 else:
129 self.launch_app("small.ogg")
130@@ -37,9 +36,6 @@
131 player = self.main_window.get_player()
132 self.assertThat(player.playing, Eventually(Equals(True)))
133
134- def tearDown(self):
135- super(TestPlayerWithVideo, self).tearDown()
136-
137 def show_controls(self):
138 video_area = self.main_window.get_video_area()
139 self.pointing_device.click_object(video_area)
140@@ -56,22 +52,20 @@
141 playback_button = self.main_window.get_playback_button()
142 player = self.main_window.get_player()
143
144- """ Default state after load the video is playing and with pause
145- icon.
146- """
147+ # Default state after load the video is playing and with pause icon.
148 self.assertProperty(player, playing=True, paused=False)
149 self.assertProperty(playback_button, icon="pause")
150
151 self.pointing_device.click_object(playback_button)
152
153- """ First click must pause the video, change playing state and show
154- play icon. """
155+ # First click must pause the video, change playing state and show play
156+ # icon.
157 self.assertProperty(player, playing=False, paused=True)
158 self.assertProperty(playback_button, icon="play")
159
160 self.pointing_device.click()
161
162- """ Second click should change the state to playing again """
163+ # Second click should change the state to playing again
164 self.assertProperty(player, playing=True, paused=False)
165 self.assertProperty(playback_button, icon="pause")
166
167@@ -83,14 +77,14 @@
168 scene_selector = self.main_window.get_scene_selector()
169 slider = self.main_window.get_slider()
170
171- """ Default state is hide """
172+ # Default state is hide
173 self.assertProperty(scene_selector, visible=False)
174
175- """ Scene selector must apper when clicking int the slider handler """
176+ # Scene selector must apper when clicking int the slider handler
177 self.pointing_device.click_object(slider)
178 self.assertProperty(scene_selector, visible=True)
179
180- """ click again must dismiss the scene selector """
181+ # click again must dismiss the scene selector
182 self.pointing_device.click()
183 self.assertProperty(scene_selector, visible=False)
184
185@@ -104,26 +98,28 @@
186 selector = self.main_window.get_scene_selector()
187 self.assertThat(selector.count, Eventually(GreaterThan(3)))
188
189- """ Show scene selector """
190+ # Show scene selector
191 self.pointing_device.click_object(slider)
192
193- """ Make sure that the scenes are in correct place """
194+ # Make sure that the scenes are in correct place
195 scene_0 = self.main_window.get_scene_0()
196 selectorRect = selector.globalRect
197 self.pointing_device.drag(
198- selectorRect[0], selectorRect[1] + selectorRect[3] / 2,
199- selectorRect[0] + selectorRect[2], selectorRect[1] + selectorRect[3] / 2)
200+ selectorRect[0], selectorRect[1] + selectorRect[3] // 2,
201+ selectorRect[0] + selectorRect[2],
202+ selectorRect[1] + selectorRect[3] // 2)
203 self.assertThat(selector.moving, Eventually(Equals(False)))
204 self.assertThat(scene_0.x, Eventually(Equals(0)))
205
206- """ Click in the second scene """
207+ # Click in the second scene
208 scene_2 = self.main_window.get_scene_2()
209 self.assertThat(scene_2.ready, Eventually(Equals(True)))
210 self.pointing_device.click_object(scene_2)
211 self.assertThat(selector.currentIndex, Eventually(Equals(2)))
212 self.assertProperty(time_line, value=1.107)
213
214- @skipIf(model() == 'Nexus 4' or model() == 'Galaxy Nexus', 'Screen width not enough for seekbar')
215+ @skipIf(model() in ('Nexus 4', 'Galaxy Nexus'),
216+ 'Screen width not enough for seekbar')
217 def test_time_display_behavior(self):
218 self.show_controls()
219 self.pause_video()
220@@ -131,24 +127,26 @@
221 time_line = self.main_window.get_slider()
222 time_label = self.main_window.get_time_label()
223
224- """ Seek to the midle of the movie """
225+ # Seek to the midle of the movie
226 self.pointing_device.click_object(time_line)
227
228- """ Time label must show the current video time (diff from zero or empty) """
229+ # Time label must show the current video time (diff from zero or empty)
230 self.assertNotEqual(time_label.text, "00:00:00")
231 self.assertNotEqual(time_label.text, "")
232
233- """ Click in the label to change the state """
234+ # Click in the label to change the state
235 self.pointing_device.click_object(time_label)
236
237- """ After the click the label must show the remaning time (with '-' signal) """
238+ # After the click the label must show the remaning time (with '-'
239+ # signal)
240 self.assertEqual(time_label.text[0:1], "-")
241
242- @skipIf(model() == 'Nexus 4' or model() == 'Galaxy Nexus', 'Screen width not enough for seekbar')
243+ @skipIf(model() in ('Nexus 4', 'Galaxy Nexus'),
244+ 'Screen width not enough for seekbar')
245 def test_show_controls_at_end(self):
246 controls = self.main_window.get_controls()
247- """ The controls are invisible by default """
248+ # The controls are invisible by default
249 self.assertThat(controls.visible, Eventually(Equals(False)))
250
251- """ wait for video ends and control appears """
252+ # wait for video ends and control appears
253 self.assertThat(controls.visible, Eventually(Equals(True), timeout=35))

Subscribers

People subscribed via source and target branches